{"record":{"id":"28d2d95e0f9fa1e2","repo":"apache/pulsar","slug":"couldn-t-get-the-azure-storage-access-key","errorCode":null,"errorMessage":"Couldn't get the azure storage access key.","messagePattern":"Couldn't get the azure storage access key\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java","lineNumber":167,"sourceCode":"                        .getBlobStore();\n            } else {\n                log.warn().attr(\"driver\", config.getDriver()).attr(\"bucket\", config.getBucket())\n                    .log(\"The credentials is null\");\n                return contextBuilder\n                        .buildView(BlobStoreContext.class)\n                        .getBlobStore();\n            }\n        }\n\n        @Override\n        public void buildCredentials(TieredStorageConfiguration config) {\n            String accountName = System.getenv(\"AZURE_STORAGE_ACCOUNT\");\n            if (StringUtils.isEmpty(accountName)) {\n                throw new IllegalArgumentException(\"Couldn't get the azure storage account.\");\n            }\n            String accountKey = System.getenv(\"AZURE_STORAGE_ACCESS_KEY\");\n            if (StringUtils.isEmpty(accountKey)) {\n                throw new IllegalArgumentException(\"Couldn't get the azure storage access key.\");\n            }\n            config.setProviderCredentials(() -> new Credentials(accountName, accountKey));\n        }\n    },\n\n\n    /**\n     * Aliyun OSS is compatible with the S3 API.\n     * https://www.alibabacloud.com/help/doc-detail/64919.htm\n     */\n    ALIYUN_OSS(\"aliyun-oss\", new AnonymousProviderMetadata(new S3ApiMetadata(), \"\")) {\n        @Override\n        public void validate(TieredStorageConfiguration config) throws IllegalArgumentException {\n            S3_VALIDATION.validate(config);\n        }\n\n        @Override\n        public BlobStore getBlobStore(TieredStorageConfiguration config) {","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java#L149-L185","documentation":"Azure offload provider configuration error: the AZURE_STORAGE_ACCESS_KEY environment variable (or equivalent config) is missing, so the storage account access key could not be obtained for credentials.","triggerScenarios":"Thrown at tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the AZURE_STORAGE_ACCESS_KEY environment variable or provide the key in configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}