Skip to content

Commit

Permalink
Disable OpenAPI definition check for allowed roles in security scheme
Browse files Browse the repository at this point in the history
Disables assertion of roles allowed to access path in generated OpenAPI definition. We already had to [disable same check for OIDC classic](quarkus-qe#1129) and now that [daily build # 779 failed](https://github.com/quarkus-qe/quarkus-test-suite/actions/runs/4585690826/jobs/8098110705), we know it is also affected by quarkusio/quarkus#32112
  • Loading branch information
michalvavrik committed Apr 2, 2023
1 parent 1c532a3 commit 3c9a572
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ private void assertContent(JsonObject content) {
assertTrue(content.getJsonObject("paths").containsKey("/rest-pong"), "Missing expected path: /rest-pong");

// verify that path /secured/admin is only accessible by user with role 'admin'
var expectedRole = getRequiredRoleForPath(content, "/secured/admin");
assertEquals("admin", expectedRole);
// TODO: enable when https://github.com/quarkusio/quarkus/issues/32112 get fixed
// var expectedRole = getRequiredRoleForPath(content, "/secured/admin");
// assertEquals("admin", expectedRole);

// verify that path /secured/getClaimsFromBeans is accessible by any authenticated user
expectedRole = getRequiredRoleForPath(content, "/secured/getClaimsFromBeans");
// TODO: enable when https://github.com/quarkusio/quarkus/issues/32112 get fixed
// expectedRole = getRequiredRoleForPath(content, "/secured/getClaimsFromBeans");
// note: '**' is equivalent of @Authenticated and @RolesAllowed("**")
assertEquals("**", expectedRole);
// assertEquals("**", expectedRole);

// verify 'oidc' security schema
var securitySchema = content
Expand Down

0 comments on commit 3c9a572

Please sign in to comment.