{"record":{"id":"c0fca0e54239269d","repo":"apolloconfig/apollo","slug":"unsupported-auth-type","errorCode":null,"errorMessage":"Unsupported auth type","messagePattern":"Unsupported auth type","errorType":"exception","errorClass":"AccessDeniedException","httpStatus":403,"severity":"error","filePath":"apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/UserController.java","lineNumber":175,"sourceCode":"\n  private boolean requireUserManagementMutationPermission(String operator) {\n    if (UserIdentityConstants.USER.equals(UserIdentityContextHolder.getAuthType())) {\n      return false;\n    }\n    if (UserIdentityConstants.USER_TOKEN.equals(UserIdentityContextHolder.getAuthType())) {\n      if (!unifiedPermissionValidator.hasManageUsersPermission()) {\n        throw new AccessDeniedException(\"Manage users permission is required\");\n      }\n      return false;\n    }\n    if (UserIdentityConstants.CONSUMER.equals(UserIdentityContextHolder.getAuthType())) {\n      if (!unifiedPermissionValidator.hasManageUsersPermission()) {\n        throw new AccessDeniedException(\"Manage users permission is required\");\n      }\n      operatorResolver.resolve(operator);\n      return true;\n    }\n    throw new AccessDeniedException(\"Unsupported auth type\");\n  }\n\n  private boolean isPortalUserIdentity() {\n    return UserIdentityConstants.USER.equals(UserIdentityContextHolder.getAuthType())\n        || UserIdentityConstants.USER_TOKEN.equals(UserIdentityContextHolder.getAuthType());\n  }\n}\n","sourceCodeStart":157,"sourceCodeEnd":183,"githubUrl":"https://github.com/apolloconfig/apollo/blob/d95fc18d112589efc09ddcbe1507047584d55251/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/UserController.java#L157-L183","documentation":"Thrown by requireUserManagementMutationPermission when the identity context's auth type is none of USER, USER_TOKEN, or CONSUMER.","triggerScenarios":"Thrown when the operator principal resolved for a user-management call is of an unsupported authentication type.","commonSituations":"Custom auth SPI returns an unexpected Principal type for these endpoints.","solutions":["Authenticate as a portal user, user token, or consumer token; no other auth types are supported for user management endpoints.","Verify the auth filters run and set a supported auth type before reaching this controller."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d95fc18d112589efc09ddcbe1507047584d55251","analyzedAt":"2026-08-14T04:00:05.477Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}