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(key-auth): keep query params order if hide_credentials is true #12758

Closed
wants to merge 5 commits into from

Commits on Apr 22, 2024

  1. fix(key-auth): keep query params order if hide_credentials is true

    When hide_credentials=true, query parameters should not be sorted
    alphabetically. This alters the original request and can have unintended
    consequences for upstream services. One example is authentication with
    the pseudo header (request-target) as described in
    https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures#section-2.3.
    Since the order is not preserved, the signature does not match and the
    upstream rejects the request.
    
    * query parameters order is not altered when hide_credentials=true
    * add two new test cases in spec/03-plugins/09-key-auth
    battlebyte committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    55fb49d View commit details
    Browse the repository at this point in the history
  2. Query string is url-decoded before substitution.

    Error handling on nginx_re_gsub.
    battlebyte committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    f08b07a View commit details
    Browse the repository at this point in the history
  3. fix lint error

    battlebyte committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    0bcf91c View commit details
    Browse the repository at this point in the history
  4. Error handling ngx_re_gsub

    battlebyte committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    6640fb2 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    e1f1e0f View commit details
    Browse the repository at this point in the history