apache/hadoop · error · KeyProviderException

Script path is not specified via…

Error message

Script path is not specified via fs.azure.shellkeyprovider.script

What it means

Thrown by the shell key provider when fs.azure.shellkeyprovider.script is unset: there is no external decryption script to invoke for unwrapping the account key.

Solutions

  1. Set fs.azure.shellkeyprovider.script to the path of the key provisioning script.
  2. Or configure a different key provider and remove the shell provider setting.
Defensive patterns

Strategy: validation

When it happens

Trigger: ShellDecryptionKeyProvider is used without configuring the script path property.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/76598bf8e7e7c52c. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ShellDecryptionKeyProvider.java:53

 */
public class ShellDecryptionKeyProvider extends SimpleKeyProvider {
  private static final Logger LOG = LoggerFactory.getLogger(ShellDecryptionKeyProvider.class);

  @Override
  public String getStorageAccountKey(String accountName, Configuration rawConfig)
      throws KeyProviderException {
    String envelope = super.getStorageAccountKey(accountName, rawConfig);

    AbfsConfiguration abfsConfig;
    try {
      abfsConfig = new AbfsConfiguration(rawConfig, accountName);
    } catch(IllegalAccessException | IOException e) {
      throw new KeyProviderException("Unable to get key from credential provider for account " + accountName, e);
    }

    final String command = abfsConfig.get(ConfigurationKeys.AZURE_KEY_ACCOUNT_SHELLKEYPROVIDER_SCRIPT);
    if (command == null) {
      throw new KeyProviderException(
          "Script path is not specified via fs.azure.shellkeyprovider.script");
    }

    String[] cmd = command.split(" ");
    String[] cmdWithEnvelope = Arrays.copyOf(cmd, cmd.length + 1);
    cmdWithEnvelope[cmdWithEnvelope.length - 1] = envelope;

    String decryptedKey = null;
    try {
      decryptedKey = Shell.execCommand(cmdWithEnvelope);
    } catch (IOException ex) {
      throw new KeyProviderException(ex);
    }

    // trim any whitespace
    return decryptedKey.trim();
  }
}

View on GitHub (pinned to 2add963021)