{"record":{"id":"0ed2c5efa67f6241","repo":"alibaba/nacos","slug":"50001-0ed2c5","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/NacosServerAuthConfig.java","lineNumber":69,"sourceCode":"    private String serverIdentityKey;\n    \n    private String serverIdentityValue;\n    \n    public NacosServerAuthConfig() {\n        super(\"NacosServerAuth\");\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_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/NacosServerAuthConfig.java#L51-L87","documentation":"Thrown by NacosServerAuthConfig.validate() (OPEN_API auth scope) at startup/config-reload when authentication is enabled but the auth system type is empty. Identical logic to the admin-scope variant (1034) but applies to the OPEN_API scope (NacosServerAuthConfig.NACOS_SERVER_AUTH_SCOPE = ApiType.OPEN_API), governing client-facing Open API auth. Error code 50001 (AuthErrorCode.INVALID_TYPE). The type comes from nacos.plugin.auth.type (legacy nacos.core.auth.system.type).","triggerScenarios":"Auth enabled (nacos.core.auth.enabled=true) without nacos.plugin.auth.type set, validated by the OPEN_API-scope config. Differs from 1034 only in which auth scope config triggers it — this one covers client/Open API requests. Thrown during NacosServerAuthConfig construction or dynamic reset.","commonSituations":"Same as 1034: enabling auth without specifying the type. Production deployments where the OPEN_API scope config is initialized before the type is resolvable. Env-var-based config missing the type variable.","solutions":["Set nacos.plugin.auth.type=nacos (or custom plugin type) whenever auth is enabled.","Migrate the legacy nacos.core.auth.system.type if upgrading.","Disable auth if it was enabled unintentionally.","Restart after correcting the property."],"exampleFix":"# before (broken)\nnacos.core.auth.enabled=true\n# (no type)\n\n# after (fixed)\nnacos.core.auth.enabled=true\nnacos.plugin.auth.type=nacos","handlingStrategy":"validation","validationCode":"# Same pre-flight as 1034 — auth type is shared across scopes\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":["Set nacos.plugin.auth.type whenever auth is enabled (covers OPEN_API scope).","Migrate the legacy property name on upgrade.","Validate config in deployment automation before startup.","Document the type requirement alongside the enabled flag."],"tags":["auth","config","java","startup","open-api","bootstrap"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}