diff --git a/presto-docs/src/main/sphinx/connector/iceberg.rst b/presto-docs/src/main/sphinx/connector/iceberg.rst index ce5a01f29a10c..619e3ef2aa842 100644 --- a/presto-docs/src/main/sphinx/connector/iceberg.rst +++ b/presto-docs/src/main/sphinx/connector/iceberg.rst @@ -72,6 +72,9 @@ Property Name Description Available values are ``BASIC`` or ``BEARER``. Example: ``BEARER`` + **Note:** Nessie BASIC authentication type is deprecated, + this will be removed in upcoming release + ``iceberg.nessie.auth.basic.username`` The username to use with ``BASIC`` authentication. Example: ``test_user`` diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/AuthenticationType.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/AuthenticationType.java index 2e821cbf36243..e284dacb2f439 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/AuthenticationType.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/AuthenticationType.java @@ -15,6 +15,11 @@ public enum AuthenticationType { + /** + * Nessie BASIC authentication type is deprecated, this auth type will be removed in upcoming release. + * https://github.com/projectnessie/nessie/blob/nessie-0.59.0/api/client/src/main/java/org/projectnessie/client/NessieConfigConstants.java#L34 + */ + @Deprecated BASIC, BEARER } diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/NessieConfig.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/NessieConfig.java index 730711945357e..2439befbe5ba7 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/NessieConfig.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/nessie/NessieConfig.java @@ -75,12 +75,14 @@ public Optional getAuthenticationType() @Config("iceberg.nessie.auth.basic.username") @ConfigDescription("The username to use with BASIC authentication") + @Deprecated public NessieConfig setUsername(String username) { this.username = username; return this; } + @Deprecated public Optional getUsername() { return Optional.ofNullable(username); @@ -88,12 +90,14 @@ public Optional getUsername() @Config("iceberg.nessie.auth.basic.password") @ConfigDescription("The password to use with BASIC authentication") + @Deprecated public NessieConfig setPassword(String password) { this.password = password; return this; } + @Deprecated public Optional getPassword() { return Optional.ofNullable(password);