{"record":{"id":"9a7aba620f260bf7","repo":"apache/hadoop","slug":"configured-fixed-sas-token-is-empty-or-null","errorCode":null,"errorMessage":"Configured Fixed SAS Token is empty or null.","messagePattern":"Configured Fixed SAS Token is empty or null\\.","errorType":"validation","errorClass":"SASTokenProviderException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/FixedSASTokenProvider.java","lineNumber":38,"sourceCode":"\nimport java.io.IOException;\n\nimport org.apache.hadoop.conf.Configuration;\nimport org.apache.hadoop.fs.azurebfs.contracts.exceptions.SASTokenProviderException;\nimport org.apache.hadoop.fs.azurebfs.extensions.SASTokenProvider;\n\n/**\n * In house implementation of {@link SASTokenProvider} to use a fixed SAS token with ABFS.\n * Use this to avoid implementing a Custom Token Provider just to return fixed SAS.\n * Fixed SAS Token to be provided using the config \"fs.azure.sas.fixed.token\".\n */\npublic class FixedSASTokenProvider implements SASTokenProvider {\n  private String fixedSASToken;\n\n  public FixedSASTokenProvider(final String fixedSASToken) throws SASTokenProviderException {\n    this.fixedSASToken = fixedSASToken;\n    if (fixedSASToken == null || fixedSASToken.isEmpty()) {\n      throw new SASTokenProviderException(\n          \"Configured Fixed SAS Token is empty or null.\");\n    }\n  }\n\n  @Override\n  public void initialize(final Configuration configuration,\n      final String accountName)\n      throws IOException {\n  }\n\n  /**\n   * Returns the fixed SAS Token configured.\n   * @param account the name of the storage account.\n   * @param fileSystem the name of the fileSystem.\n   * @param path the file or directory path.\n   * @param operation the operation to be performed on the path.\n   * @return Fixed SAS Token\n   * @throws IOException never","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/FixedSASTokenProvider.java#L20-L56","documentation":"Error \"Configured Fixed SAS Token is empty or null.\" thrown in apache/hadoop.","triggerScenarios":"The fixed SAS token provider is selected but the configured token is null or empty.","commonSituations":"See trigger scenarios.","solutions":["Set the fixed SAS token configuration (fs.azure.sas.fixed.token) to a valid non-empty SAS string.","Remove the fixed token configuration to use another auth mechanism."],"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-23T01:17:44.959Z"}