-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow for relative OAuth token URLs #319
Comments
…mes-oauth-http Allows now `https://` (as before) well as relative urls like `/token` (new). Relative URLs must start with a `/`. Fixes italia#319
Hi @codedust and @JonasGroeger and thanks for filing this issue! When the OAuth token URL is relative, is it supposed to be based on the What do you think about adding an |
Precisely.
Currently there is no such feature on the https url aswell. So I think this is out of scope for now. |
@JonasGroeger in
|
Hi Roberto, Maybe I'm not understanding something here. If so, do tell me. Relative URLs are explicitly allowed in OpenAPI 3.x. The spec says:
|
@JonasGroeger the goal of oas-checker rules is to provide additional checks respect to the ones included in openapi. In this respect, people using the security ruleset wants to be sure that eg. OAuth2 endpoints are https protected. So, using relative URLs is perfecly ok for OAS, but when you use the additional "extra security check" ruleset, it complains because it can't be sure that this relative URL is https-protected. The easy solution is to skip the check in some way (eg. x-noqa, ... ) at the level of the check. WDYT? |
The correct solution would be to check recursively if the url is HTTPS I guess. I'll see if I can somehow implement that |
Another - simpler - idea could be to selectively disable the rule. Do you use the online validator or the spectral CLI? The online validator could support a way to selectively disable some rules (eg. flagging them). |
We now have a javascript security rule. Can this be tweaked/duplicated to accommodate this use case? @JonasGroeger @codedust https://github.com/italia/api-oas-checker/blob/master/security/functions/checkSecurity.js |
securitySchemes-oauth-http
enforceshttps://
. However relative urls (such astokenURL: /token
) should also be allowed.The text was updated successfully, but these errors were encountered: