{"record":{"id":"19072c2f273e228b","repo":"apache/druid","slug":"role-s-does-not-exist-19072c","errorCode":null,"errorMessage":"Role [%s] does not exist.","messagePattern":"Role \\[(.+?)\\] does not exist\\.","errorType":"http","errorClass":"BasicSecurityDBResourceException","httpStatus":400,"severity":"error","filePath":"extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/endpoint/CoordinatorBasicAuthorizerResourceHandler.java","lineNumber":615,"sourceCode":"      BasicAuthorizerGroupMappingFull fullGroup = new BasicAuthorizerGroupMappingFull(groupMapping.getName(), groupMapping.getGroupPattern(), roles);\n      return Response.ok(fullGroup).build();\n    }\n    catch (BasicSecurityDBResourceException e) {\n      return makeResponseForBasicSecurityDBResourceException(e);\n    }\n  }\n\n  private Response getRoleSimple(String authorizerName, String roleName, boolean simplifyPermissions)\n  {\n    Map<String, BasicAuthorizerRole> roleMap = BasicAuthUtils.deserializeAuthorizerRoleMap(\n        objectMapper,\n        storageUpdater.getCurrentRoleMapBytes(authorizerName)\n    );\n\n    try {\n      BasicAuthorizerRole role = roleMap.get(roleName);\n      if (role == null) {\n        throw new BasicSecurityDBResourceException(\"Role [%s] does not exist.\", roleName);\n      }\n\n      if (simplifyPermissions) {\n        return Response.ok(new BasicAuthorizerRoleSimplifiedPermissions(role, null)).build();\n      } else {\n        return Response.ok(role).build();\n      }\n    }\n    catch (BasicSecurityDBResourceException e) {\n      return makeResponseForBasicSecurityDBResourceException(e);\n    }\n  }\n\n  private Response getRoleFull(String authorizerName, String roleName, boolean simplifyPermissions)\n  {\n    Map<String, BasicAuthorizerRole> roleMap = BasicAuthUtils.deserializeAuthorizerRoleMap(\n        objectMapper,\n        storageUpdater.getCurrentRoleMapBytes(authorizerName)","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/endpoint/CoordinatorBasicAuthorizerResourceHandler.java#L597-L633","documentation":"getRoleSimple() deserializes the persisted role map for the authorizer and looks up roleName. When the map contains no entry for that name (the role was deleted or never created, or the authorizer name points at a different store), the handler throws BasicSecurityDBResourceException. The faulty input is the role name (or authorizer name) supplied to the API.","triggerScenarios":"Thrown at extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/endpoint/CoordinatorBasicAuthorizerResourceHandler.java:615 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the role name and authorizer name in the request (GET .../roles/<roleName>)","List existing roles to check the exact spelling/case of the role","Recreate the role via the coordinator API if it was removed, or restore the authorizer DB state from backup"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}