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

Support "Authorization: Bearer xxx" token passing format in cubejs-api-gateway #1297

Open
joshk0 opened this issue Nov 4, 2020 · 2 comments
Open

Comments

@joshk0
Copy link

@joshk0 joshk0 commented Nov 4, 2020

Is your feature request related to a problem? Please describe.

It is idiomatic for JWTs to be accepted using a header format of Authorization: Bearer <JWT> (see jwt.io introduction.) In general, in history, the RFCs surrounding the authorization header have taken care to specify the mode of Authorization as the first part of the header value (e.g. Basic, Digest et al.) See RFC 2617 and RFC 6750.

However, according to Cube.js docs, you in fact must pass the token as a bare string in the Authorization header. Since you do use JWTs idiomatically, people will naturally be drawn to specifying the Authorization header as a Bearer token.

Describe the solution you'd like
In cubejs-api-gateway, please support the use of the idiomatic Authorization: Bearer xxx method of passing JWTs into a webservice.

Describe alternatives you've considered
If you had a reason to want the key passed as a bare string, you could come up with an unofficial header key and value, such as X-Cubejs-JWT. Then there would be no expectations around what format that header would have and people would double check before using the API.

@hassankhan
Copy link
Member

@hassankhan hassankhan commented Nov 4, 2020

Interestingly, AWS Cognito does not use the Authorization: Bearer <JWT> format either.

@paveltiunov
Copy link
Contributor

@paveltiunov paveltiunov commented Nov 4, 2020

@joshk0 Hey Joshua! Thanks for posting it! It's really small change and we're looking for a volunteer to contribute this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.