Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(opensearch): show search results only if user has access to the index #5000

Closed
ivor-juspay opened this issue Jun 13, 2024 · 0 comments · Fixed by #5097
Closed

fix(opensearch): show search results only if user has access to the index #5000

ivor-juspay opened this issue Jun 13, 2024 · 0 comments · Fixed by #5097
Assignees

Comments

@ivor-juspay
Copy link
Contributor

ivor-juspay commented Jun 13, 2024

/search and /search/{domain} are currently checking for analytics ACL before hitting opensearch and returning results.

we have to change this to check access permissions per index

payments attempts/intents => PaymentRead | PaymentWrite
refunds => RefundRead | RefundWrite
disputes => DisputeRead | DisputeWrite

can modify GetSearchResponse to include status

enum SearchStatus = Success | Failure | NoAccess

pub struct GetSearchResponse {
    pub count: u64,
    pub index: SearchIndex,
    pub hits: Vec<Value>,
    pub status: SearchStatus
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants