{"record":{"id":"9b2694a100425d79","repo":"apache/druid","slug":"group-mapping-s-does-not-exist-9b2694","errorCode":null,"errorMessage":"Group mapping [%s] does not exist.","messagePattern":"Group mapping \\[(.+?)\\] 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":560,"sourceCode":"        log.error(\"User [%s] had role [%s], but role object was not found.\", user.getName(), roleName);\n      } else {\n        roles.add(role);\n      }\n    }\n    return roles;\n  }\n\n  private Response getGroupMappingSimple(String authorizerName, String groupMappingName)\n  {\n    Map<String, BasicAuthorizerGroupMapping> groupMappings = BasicAuthUtils.deserializeAuthorizerGroupMappingMap(\n        objectMapper,\n        storageUpdater.getCurrentGroupMappingMapBytes(authorizerName)\n    );\n\n    try {\n      BasicAuthorizerGroupMapping groupMapping = groupMappings.get(groupMappingName);\n      if (groupMapping == null) {\n        throw new BasicSecurityDBResourceException(\"Group mapping [%s] does not exist.\", groupMappingName);\n      }\n      return Response.ok(groupMapping).build();\n    }\n    catch (BasicSecurityDBResourceException e) {\n      return makeResponseForBasicSecurityDBResourceException(e);\n    }\n  }\n\n  private Response getGroupMappingFull(String authorizerName, String groupMappingName)\n  {\n    Map<String, BasicAuthorizerGroupMapping> groupMappings = BasicAuthUtils.deserializeAuthorizerGroupMappingMap(\n        objectMapper,\n        storageUpdater.getCurrentGroupMappingMapBytes(authorizerName)\n    );\n\n    try {\n      BasicAuthorizerGroupMapping groupMapping = groupMappings.get(groupMappingName);\n      if (groupMapping == null) {","sourceCodeStart":542,"sourceCodeEnd":578,"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#L542-L578","documentation":"getGroupMappingSimple() deserializes the authorizer's persisted group-mapping map from the metadata store and does a plain map lookup by name. A null result — the requested groupMappingName simply does not exist for the given authorizer — is converted into a BasicSecurityDBResourceException. The faulty input is the group mapping name in the coordinator API request, or the authorizer name addressing the wrong store.","triggerScenarios":"Thrown at extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/endpoint/CoordinatorBasicAuthorizerResourceHandler.java:560 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the group mapping name and authorizer name used in the API call (e.g. GET /druid-ext/basic-security/authorization/<authorizer>/groupMappings/<name>)","List the existing group mappings to find the correct name before retrying","Create the missing group mapping via the coordinator API if it was never provisioned, or restore the authorizer metadata store 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"}