-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
OpenAPI does not correctly generate security schema when @RolesAllowed is used #30997
Labels
Milestone
Comments
/cc @EricWittmann (openapi), @MikeEdgar (openapi), @phillip-kruger (openapi), @sberyozkin (security) |
Agree, this is a bug. I'll have a look a.s.a.p. If you are in a hurry please do a PR. |
Ok, I'm not crazy, got this issue for months but never bothered to create the issue |
MikeEdgar
added a commit
to MikeEdgar/quarkus
that referenced
this issue
Mar 7, 2023
- Handle method-level `@RolesAllowed` that override class-level `@RolesAllowed` values, fixes quarkusio#30997 - Render `BaseStream<T, S>` as array of `T` in OpenAPI document, fixes quarkusio#30248 (via smallrye-open-api 3.3.0) - Do not place scopes in OpenAPI security requirements unless the security scheme is OAuth2 or OIDC, fixes quarkusio#27373 - Include only OIDC discovery URL in OpenAPI when auto-security is active, fixes quarkusio#21126 Signed-off-by: Michael Edgar <[email protected]>
MikeEdgar
added a commit
to MikeEdgar/quarkus
that referenced
this issue
Mar 8, 2023
- Handle method-level `@RolesAllowed` that override class-level `@RolesAllowed` values, fixes quarkusio#30997 - Render `BaseStream<T, S>` as array of `T` in OpenAPI document, fixes quarkusio#30248 (via smallrye-open-api 3.3.0) - Do not place scopes in OpenAPI security requirements unless the security scheme is OAuth2 or OIDC, fixes quarkusio#27373 - Include only OIDC discovery URL in OpenAPI when auto-security is active, fixes quarkusio#21126 Signed-off-by: Michael Edgar <[email protected]>
MikeEdgar
added a commit
to MikeEdgar/quarkus
that referenced
this issue
Mar 8, 2023
- Handle method-level `@RolesAllowed` that override class-level `@RolesAllowed` values, fixes quarkusio#30997 - Render `BaseStream<T, S>` as array of `T` in OpenAPI document, fixes quarkusio#30248 (via smallrye-open-api 3.3.0) - Do not place scopes in OpenAPI security requirements unless the security scheme is OAuth2 or OIDC, fixes quarkusio#27373 - Include only OIDC discovery URL in OpenAPI when auto-security is active, fixes quarkusio#21126 Signed-off-by: Michael Edgar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
quarkus-smallrye-openapi
creates incorrect security schema for endpoints, which use@RolesAllowed
annotation on both class level and method level.E.g.:
Then the
/q/openapi
produces:The actual behavior of the
/roles-allowed-user/roles-allowed-admin
endpoint correctly reflects the security specification and requires theadmin
role.However, the OpenAPI schema shows the
user
role in the endpoint.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Output of
uname -a
orver
Linux ... 6.0.15-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 21 18:33:23 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.12" 2021-07-20
GraalVM version (if different from Java)
No response
Quarkus version or git rev
999-SNAPSHOT, 2.16.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.8.6
Additional information
No response
The text was updated successfully, but these errors were encountered: