{"record":{"id":"82cce2ef0427fefb","repo":"apache/iceberg","slug":"inferring-since-property-was-provided-pl","errorCode":null,"errorMessage":"Inferring {}={} since property {} was provided. Please explicitly set {} to avoid this warning.","messagePattern":"Inferring (.+?)=(.+?) since property (.+?) was provided\\. Please explicitly set (.+?) to avoid this warning\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/src/main/java/org/apache/iceberg/rest/auth/AuthManagers.java","lineNumber":58,"sourceCode":"    if (properties.containsKey(SIGV4_ENABLED_LEGACY)) {\n      LOG.warn(\n          \"The property {} is deprecated and will be removed in a future release. \"\n              + \"Please use the property {}={} instead.\",\n          SIGV4_ENABLED_LEGACY,\n          AuthProperties.AUTH_TYPE,\n          AuthProperties.AUTH_TYPE_SIGV4);\n    }\n\n    String authType;\n    if (PropertyUtil.propertyAsBoolean(properties, SIGV4_ENABLED_LEGACY, false)) {\n      authType = AuthProperties.AUTH_TYPE_SIGV4;\n    } else {\n      authType = properties.get(AuthProperties.AUTH_TYPE);\n      if (authType == null) {\n        boolean hasCredential = properties.containsKey(OAuth2Properties.CREDENTIAL);\n        boolean hasToken = properties.containsKey(OAuth2Properties.TOKEN);\n        if (hasCredential || hasToken) {\n          LOG.warn(\n              \"Inferring {}={} since property {} was provided. \"\n                  + \"Please explicitly set {} to avoid this warning.\",\n              AuthProperties.AUTH_TYPE,\n              AuthProperties.AUTH_TYPE_OAUTH2,\n              hasCredential ? OAuth2Properties.CREDENTIAL : OAuth2Properties.TOKEN,\n              AuthProperties.AUTH_TYPE);\n          authType = AuthProperties.AUTH_TYPE_OAUTH2;\n        } else {\n          authType = AuthProperties.AUTH_TYPE_NONE;\n        }\n      }\n    }\n\n    AuthManager delegate = null;\n    if (authType.equals(AuthProperties.AUTH_TYPE_SIGV4)) {\n      String delegateAuthType =\n          properties.getOrDefault(\n              AuthProperties.SIGV4_DELEGATE_AUTH_TYPE,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/rest/auth/AuthManagers.java#L40-L76","documentation":"AuthManagers.loadAuthManager infers the auth type as 'oauth2' when a credential or token property is present but AuthProperties.AUTH_TYPE is unset. It logs this warning asking users to set auth.type explicitly, then proceeds with the inferred OAuth2 auth manager.","triggerScenarios":"Creating a REST catalog client with properties containing 'rest.credential' (or 'rest.token') but no 'rest.auth.type' key.","commonSituations":"Legacy configs written before auth.type existed, examples/tutorials that only set credential, multi-auth setups where inference picks the wrong manager.","solutions":["Explicitly set AuthProperties.AUTH_TYPE to 'oauth2' (or the intended type) in the catalog properties.","Remove credential/token properties if OAuth2 is not the intended auth mechanism.","Update configuration templates/docs to include auth.type to silence the deprecation-style warning."],"exampleFix":"// before\nprops.put(\"rest.credential\", \"client:secret\");\n// after\nprops.put(\"rest.auth.type\", \"oauth2\");\nprops.put(\"rest.credential\", \"client:secret\");","handlingStrategy":"validation","validationCode":"if (props.containsKey(\"rest.credential\") || props.containsKey(\"rest.token\")) {\n  Preconditions.checkArgument(props.containsKey(\"rest.auth.type\"), \"Set rest.auth.type explicitly\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set rest.auth.type alongside credential/token","Update legacy configs predating auth.type","Keep a single config template with explicit auth settings"],"tags":["rest","auth","configuration","deprecation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}