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

opa: pass URL query parameters to OPA policy evaluation #3207

Merged
merged 6 commits into from
Sep 12, 2024

Commits on Aug 26, 2024

  1. opa: pass URL query parameters to OPA policy evaluation

    Improve the envoy request adapting logic to include query parameters sent in the request.
    This would allow the policy evaluationin opaAuthorizeRequest* and opaServeResponse* filters to make use of query parameters/values in the policy.
    
    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    6dcb620 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Add test cases to cover multi valued query params and trailing ? in U…

    …RL path
    
    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    c196e2a View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. Change the logic to build path with query params

    - Use escaped path + raw query string to build the path set in envoy request
    - Add test cases to cover few additional special cases (empty query string, space in path)
    
    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    562a348 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Fix error message when unescaping query string

    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    22af1e1 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Add unit tests for encoding in query path

    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    66715d3 View commit details
    Browse the repository at this point in the history
  2. Use req.URL.RequestURI() to set the path with query params

    Signed-off-by: Farasath Ahamed <[email protected]>
    Farasath Ahamed committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    d2e3794 View commit details
    Browse the repository at this point in the history