quarkusio/quarkus · error · IllegalArgumentException

Auth config file not found: ${path}

Error message

Auth config file not found: ${path}

What it means

When the Azure Functions plugin is configured to load auth settings from a properties file, fromFile checks that the given file exists before parsing. If the path is set but points to a missing file, it throws IllegalArgumentException with the resolved path. The deployment cannot authenticate to Azure without it.

Source

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

         * Tenant ID required if using <i>oauth2</i> or <i>device_code</i> type
         */
        Optional<String> tenant();

        private static String findValue(Properties props, String key) {
            if (props.contains(key))
                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)));

View on GitHub (pinned to e1c734241f)

Solutions

  1. Verify the path is correct relative to the Maven working directory; prefer ${project.basedir} in pom.xml
  2. Ensure the auth file is generated/checked out before the deploy phase in CI
  3. List the directory to confirm the file exists with the exact name and case

Example fix

<!-- before -->
<quarkus.azure-functions.auth.path>azure.auth.properties</quarkus.azure-functions.auth.path>
<!-- after -->
<quarkus.azure-functions.auth.path>${project.basedir}/src/main/azure/azure.auth.properties</quarkus.azure-functions.auth.path>
Defensive patterns

Strategy: validation

Validate before calling

Path auth = Paths.get(authPath);
if (!Files.isRegularFile(auth)) {
  throw new IllegalStateException("Auth config file missing: " + auth.toAbsolutePath());
}

Prevention

When it happens

Trigger: quarkus.azure-functions.auth.path points to a file that does not exist at the time quarkus:deploy runs — wrong relative path, file deleted, or CI working directory differs from local.

Common situations: Relative paths resolving against a different working directory in CI; auth file excluded from the repo and not generated; typo in filename or extension; running from a submodule directory.

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


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