quarkusio/quarkus · error · IllegalArgumentException

Auth config file does not define type: ${path}

Error message

Auth config file does not define type: ${path}

What it means

The auth properties file must contain a 'type' key identifying the Azure credential type (parsed via AuthType.parseAuthType). If the file loads successfully but has no 'type' entry, fromFile throws IllegalArgumentException. Without the type, the plugin cannot construct the credential configuration.

Source

Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsConfig.java:262

                return (String) props.get(key);
            return (String) props.get("quarkus.azure-functions.auth." + key);
        }

        private static AuthConfiguration fromFile(Optional<String> path) {
            try {
                if (path.isEmpty()) {
                    throw new IllegalArgumentException("Path must be set if using file auth config");

                }
                File file = new File(path.get());
                if (!file.exists()) {
                    throw new IllegalArgumentException("Auth config file not found: " + path.get());
                }
                Properties props = new Properties();
                props.load(new FileInputStream(file));
                String typeVal = findValue(props, "type");
                if (typeVal == null) {
                    throw new IllegalArgumentException("Auth config file does not define type: " + path);
                }
                final AuthType type = AuthType.parseAuthType(typeVal);
                final AuthConfiguration authConfiguration = new AuthConfiguration(type);
                authConfiguration.setClient(findValue(props, "client"));
                authConfiguration.setTenant(findValue(props, "tenant"));
                authConfiguration.setCertificate(findValue(props, "certificate"));
                authConfiguration.setCertificatePassword(findValue(props, "certificate-password"));
                authConfiguration.setKey(findValue(props, "key"));

                authConfiguration.setEnvironment(findValue(props, "environment"));
                authConfiguration.setEnvironment(Optional.ofNullable(authConfiguration.getEnvironment())
                        .orElseGet(() -> AzureEnvironmentUtils.azureEnvironmentToString(AzureEnvironment.AZURE)));

                if (authConfiguration.getType() == AuthType.SERVICE_PRINCIPAL) {
                    authConfiguration.validate();
                }

                return authConfiguration;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Add a 'type' entry (e.g. type=azure_cli) to the auth properties file
  2. Compare against the expected keys: type, client, tenant, certificate, depending on auth type
  3. Regenerate the file using the documented format rather than hand-editing

Example fix

# before: azure.auth.properties
client=my-client-id
tenant=my-tenant-id
# after: azure.auth.properties
type=service_principal
client=my-client-id
tenant=my-tenant-id
certificate=/path/to/cert.pem
Defensive patterns

Strategy: validation

Validate before calling

Properties props = new Properties();
try (InputStream in = new FileInputStream(authPath)) { props.load(in); }
if (props.getProperty("type") == null) {
  throw new IllegalStateException("Auth properties file must define 'type'");
}

Prevention

When it happens

Trigger: Auth properties file exists and is readable but lacks a line like type=azure_cli (or client_secret / service_principal), typically because the file was hand-written or truncated.

Common situations: Manually created auth file missing required keys; file copied from a different tool with different key names; keys commented out.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/e811f299b44fc308. Report an issue: GitHub.