{"record":{"id":"bc55759388f5059c","repo":"alibaba/nacos","slug":"50001","errorCode":"50001","errorMessage":"Invalid auth type, Please set `nacos.plugin.auth.type` (legacy alias: `nacos.core.auth.system.type`), detail: https://nacos.io/docs/latest/manual/admin/auth/","messagePattern":"Invalid auth type, Please set `nacos\\.plugin\\.auth\\.type` \\(legacy alias: `nacos\\.core\\.auth\\.system\\.type`\\), detail: https://nacos\\.io/docs/latest/manual/admin/auth/","errorType":"error_code","errorClass":"NacosRuntimeException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/com/alibaba/nacos/core/auth/NacosServerAdminAuthConfig.java","lineNumber":69,"sourceCode":"    private String serverIdentityKey;\n    \n    private String serverIdentityValue;\n    \n    public NacosServerAdminAuthConfig() {\n        super(\"NacosServerAdminAuth\");\n        resetConfig();\n        validate();\n    }\n    \n    /**\n     * Validate auth config.\n     */\n    private void validate() {\n        if (!authEnabled) {\n            return;\n        }\n        if (StringUtils.isEmpty(nacosAuthSystemType)) {\n            throw new NacosRuntimeException(AuthErrorCode.INVALID_TYPE.getCode(),\n                AuthErrorCode.INVALID_TYPE.getMsg());\n        }\n        if (StringUtils.isEmpty(serverIdentityKey) || StringUtils.isEmpty(serverIdentityValue)) {\n            throw new NacosRuntimeException(AuthErrorCode.EMPTY_IDENTITY.getCode(),\n                AuthErrorCode.EMPTY_IDENTITY.getMsg());\n        }\n    }\n    \n    @Override\n    public String getAuthScope() {\n        return NACOS_SERVER_ADMIN_AUTH_SCOPE;\n    }\n    \n    /**\n     * server auth function is open.\n     *\n     * @return server auth function is open\n     */","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/auth/NacosServerAdminAuthConfig.java#L51-L87","documentation":"Thrown by NacosServerAdminAuthConfig.validate() (ADMIN_API auth scope) at startup/config-reload when authentication is enabled (nacos.core.auth.enabled=true) but the auth system type is empty. The type is resolved via AuthPluginTypeResolver from nacos.plugin.auth.type (legacy alias nacos.core.auth.system.type). Error code 50001 (AuthErrorCode.INVALID_TYPE). This is a server bootstrap/configuration failure — the server refuses to run in this inconsistent state.","triggerScenarios":"Setting nacos.core.auth.enabled=true (or nacos.plugin.auth.enabled) without also setting nacos.plugin.auth.type / nacos.core.auth.system.type. Applies to the admin API auth scope (NACOS_SERVER_ADMIN_AUTH_SCOPE). Thrown during NacosServerAdminAuthConfig construction or dynamic config reset.","commonSituations":"Operator enables auth in application.properties but forgets the type property. Migration from legacy property name without carrying over the value. Custom deployment (Helm/k8s) setting only the enabled flag.","solutions":["Set nacos.plugin.auth.type=nacos (or your custom auth plugin type) in application.properties when auth is enabled.","If upgrading, ensure the legacy nacos.core.auth.system.type value is migrated to nacos.plugin.auth.type.","Alternatively, disable auth (nacos.core.auth.enabled=false) if auth is not intended.","Restart the server after correcting the config."],"exampleFix":"# before (broken)\nnacos.core.auth.enabled=true\n# (no type set)\n\n# after (fixed)\nnacos.core.auth.enabled=true\nnacos.plugin.auth.type=nacos","handlingStrategy":"validation","validationCode":"# Shell pre-flight check before starting Nacos with auth enabled\nif grep -q 'nacos.core.auth.enabled=true' application.properties \\\n   && ! grep -qE 'nacos.plugin.auth.type|nacos.core.auth.system.type' application.properties; then\n  echo 'ERROR: auth enabled but nacos.plugin.auth.type is not set'; exit 1;\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair nacos.core.auth.enabled=true with nacos.plugin.auth.type=<type>.","Validate the config pair in deployment scripts/Helm charts before startup.","When upgrading, migrate nacos.core.auth.system.type to nacos.plugin.auth.type.","Run a config sanity check in CI for Nacos deployment artifacts."],"tags":["auth","config","java","startup","admin-api","bootstrap"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}