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

Enhancement Request: Support Bearer Token in Query Parameters #1480

Open
mdaneri opened this issue Feb 8, 2025 · 0 comments
Open

Enhancement Request: Support Bearer Token in Query Parameters #1480

mdaneri opened this issue Feb 8, 2025 · 0 comments

Comments

@mdaneri
Copy link
Contributor

mdaneri commented Feb 8, 2025

Description
Currently, Pode only supports bearer authentication via the Authorization header. However, per [RFC 6750, Section 2.3](https://datatracker.ietf.org/doc/html/rfc6750#section-2.3), bearer tokens can also be transmitted as query parameters. This enhancement adds support for parsing bearer tokens from query parameters, improving compatibility with clients that may not support custom headers.

Proposed Enhancements

  • Allow bearer tokens in query parameters: Pode should accept tokens passed via the access_token query parameter.
  • Example Usage:
    GET /protected-resource?access_token=<jwt>
    
  • Security Consideration:
    • The Authorization header remains the recommended method for sending bearer tokens.
    • Query parameters may expose tokens in logs, so their use should be limited to cases where headers are not feasible.
    • Pode should log a warning when bearer tokens are received via query parameters to remind developers of potential security risks.

Why This is Needed

  • Improves compatibility with web applications that rely on query parameters for authentication.
  • Aligns Pode’s bearer authentication implementation with RFC 6750.
  • Allows greater flexibility for API consumers while maintaining security recommendations.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant