apache/iceberg · warning

Inferring = since property was provided. Please explicitly…

Error message

Inferring {}={} since property {} was provided. Please explicitly set {} to avoid this warning.

What it means

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.

Solutions

  1. Explicitly set AuthProperties.AUTH_TYPE to 'oauth2' (or the intended type) in the catalog properties.
  2. Remove credential/token properties if OAuth2 is not the intended auth mechanism.
  3. Update configuration templates/docs to include auth.type to silence the deprecation-style warning.

Example fix

// before
props.put("rest.credential", "client:secret");
// after
props.put("rest.auth.type", "oauth2");
props.put("rest.credential", "client:secret");
Defensive patterns

Strategy: validation

Validate before calling

if (props.containsKey("rest.credential") || props.containsKey("rest.token")) {
  Preconditions.checkArgument(props.containsKey("rest.auth.type"), "Set rest.auth.type explicitly");
}

Prevention

When it happens

Trigger: Creating a REST catalog client with properties containing 'rest.credential' (or 'rest.token') but no 'rest.auth.type' key.

Common situations: Legacy configs written before auth.type existed, examples/tutorials that only set credential, multi-auth setups where inference picks the wrong manager.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/82cce2ef0427fefb. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/apache/iceberg/rest/auth/AuthManagers.java:58

    if (properties.containsKey(SIGV4_ENABLED_LEGACY)) {
      LOG.warn(
          "The property {} is deprecated and will be removed in a future release. "
              + "Please use the property {}={} instead.",
          SIGV4_ENABLED_LEGACY,
          AuthProperties.AUTH_TYPE,
          AuthProperties.AUTH_TYPE_SIGV4);
    }

    String authType;
    if (PropertyUtil.propertyAsBoolean(properties, SIGV4_ENABLED_LEGACY, false)) {
      authType = AuthProperties.AUTH_TYPE_SIGV4;
    } else {
      authType = properties.get(AuthProperties.AUTH_TYPE);
      if (authType == null) {
        boolean hasCredential = properties.containsKey(OAuth2Properties.CREDENTIAL);
        boolean hasToken = properties.containsKey(OAuth2Properties.TOKEN);
        if (hasCredential || hasToken) {
          LOG.warn(
              "Inferring {}={} since property {} was provided. "
                  + "Please explicitly set {} to avoid this warning.",
              AuthProperties.AUTH_TYPE,
              AuthProperties.AUTH_TYPE_OAUTH2,
              hasCredential ? OAuth2Properties.CREDENTIAL : OAuth2Properties.TOKEN,
              AuthProperties.AUTH_TYPE);
          authType = AuthProperties.AUTH_TYPE_OAUTH2;
        } else {
          authType = AuthProperties.AUTH_TYPE_NONE;
        }
      }
    }

    AuthManager delegate = null;
    if (authType.equals(AuthProperties.AUTH_TYPE_SIGV4)) {
      String delegateAuthType =
          properties.getOrDefault(
              AuthProperties.SIGV4_DELEGATE_AUTH_TYPE,

View on GitHub (pinned to 86d9c8fc54)