{"record":{"id":"4428e7322fcaf3cc","repo":"apache/hadoop","slug":"service-level-authorization-not-enabled","errorCode":null,"errorMessage":"Service Level Authorization not enabled!","messagePattern":"Service Level Authorization not enabled!","errorType":"exception","errorClass":"AuthorizationException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java","lineNumber":1793,"sourceCode":"   * @throws UnregisteredNodeException if the registration is invalid\n   */\n  private void verifyRequest(NodeRegistration nodeReg) throws IOException {\n    // verify registration ID\n    final String id = nodeReg.getRegistrationID();\n    final String expectedID = namesystem.getRegistrationID();\n    if (!expectedID.equals(id)) {\n      LOG.warn(\"Registration IDs mismatched: the \"\n          + nodeReg.getClass().getSimpleName() + \" ID is \" + id\n          + \" but the expected ID is \" + expectedID);\n       throw new UnregisteredNodeException(nodeReg);\n    }\n  }\n\n  @Override // RefreshAuthorizationPolicyProtocol\n  public void refreshServiceAcl() throws IOException {\n    checkNNStartup();\n    if (!serviceAuthEnabled) {\n      throw new AuthorizationException(\"Service Level Authorization not enabled!\");\n    }\n\n    this.clientRpcServer.refreshServiceAcl(new Configuration(), new HDFSPolicyProvider());\n    if (this.serviceRpcServer != null) {\n      this.serviceRpcServer.refreshServiceAcl(new Configuration(), new HDFSPolicyProvider());\n    }\n    namesystem.logAuditEvent(true, \"refreshServiceAcl\", null);\n  }\n\n  @Override // RefreshAuthorizationPolicyProtocol\n  public void refreshUserToGroupsMappings() throws IOException {\n    LOG.info(\"Refreshing all user-to-groups mappings. Requested by user: \" +\n        getRemoteUser().getShortUserName());\n    Groups.getUserToGroupsMappingService().refresh();\n    namesystem.logAuditEvent(true, \"refreshUserToGroupsMappings\", null);\n  }\n\n  @Override // RefreshAuthorizationPolicyProtocol","sourceCodeStart":1775,"sourceCodeEnd":1811,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java#L1775-L1811","documentation":"Error \"Service Level Authorization not enabled!\" thrown in apache/hadoop.","triggerScenarios":"An admin attempts to refresh service ACLs while SLA is disabled.","commonSituations":"Running 'hdfs dfsadmin -refreshServiceAcl' on a cluster with hadoop.security.authorization=false.","solutions":["Enable Service Level Authorization by setting hadoop.security.authorization=true in core-site.xml."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}