Skip to content

Commit 40cadfe

Browse files
Rename NONE -> IMPLICIT
1 parent 09b80f8 commit 40cadfe

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

polaris-core/src/main/java/org/apache/polaris/core/connection/AuthenticationParametersDpo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@JsonSubTypes({
4040
@JsonSubTypes.Type(value = OAuthClientCredentialsParametersDpo.class, name = "1"),
4141
@JsonSubTypes.Type(value = BearerAuthenticationParametersDpo.class, name = "2"),
42-
@JsonSubTypes.Type(value = NoneAuthenticationParametersDpo.class, name = "3"),
42+
@JsonSubTypes.Type(value = ImplicitAuthenticationParametersDpo.class, name = "3"),
4343
})
4444
public abstract class AuthenticationParametersDpo implements IcebergCatalogPropertiesProvider {
4545

@@ -82,8 +82,8 @@ public static AuthenticationParametersDpo fromAuthenticationParametersModelWithS
8282
new BearerAuthenticationParametersDpo(
8383
secretReferences.get(INLINE_BEARER_TOKEN_REFERENCE_KEY));
8484
break;
85-
case NONE:
86-
config = new NoneAuthenticationParametersDpo();
85+
case IMPLICIT:
86+
config = new ImplicitAuthenticationParametersDpo();
8787
break;
8888
default:
8989
throw new IllegalStateException(

polaris-core/src/main/java/org/apache/polaris/core/connection/AuthenticationType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum AuthenticationType {
3333
NULL_TYPE(0),
3434
OAUTH(1),
3535
BEARER(2),
36-
NONE(3),
36+
IMPLICIT(3),
3737
;
3838

3939
private static final AuthenticationType[] REVERSE_MAPPING_ARRAY;
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
import com.google.common.base.MoreObjects;
2222
import java.util.Map;
2323
import org.apache.polaris.core.admin.model.AuthenticationParameters;
24-
import org.apache.polaris.core.admin.model.NoneAuthenticationParameters;
24+
import org.apache.polaris.core.admin.model.ImplicitAuthenticationParameters;
2525
import org.apache.polaris.core.secrets.UserSecretsManager;
2626

2727
/**
28-
* The internal persistence-object counterpart to NoneAuthenticationParameters defined in the API
29-
* model.
28+
* The internal persistence-object counterpart to ImplicitAuthenticationParameters defined in the
29+
* API model.
3030
*/
31-
public class NoneAuthenticationParametersDpo extends AuthenticationParametersDpo {
31+
public class ImplicitAuthenticationParametersDpo extends AuthenticationParametersDpo {
3232

33-
public NoneAuthenticationParametersDpo() {
34-
super(AuthenticationType.NONE.getCode());
33+
public ImplicitAuthenticationParametersDpo() {
34+
super(AuthenticationType.IMPLICIT.getCode());
3535
}
3636

3737
@Override
@@ -41,8 +41,8 @@ public Map<String, String> asIcebergCatalogProperties(UserSecretsManager secrets
4141

4242
@Override
4343
public AuthenticationParameters asAuthenticationParametersModel() {
44-
return NoneAuthenticationParameters.builder()
45-
.setAuthenticationType(AuthenticationParameters.AuthenticationTypeEnum.NONE)
44+
return ImplicitAuthenticationParameters.builder()
45+
.setAuthenticationType(AuthenticationParameters.AuthenticationTypeEnum.IMPLICIT)
4646
.build();
4747
}
4848

polaris-core/src/test/java/org/apache/polaris/core/connection/ConnectionConfigInfoDpoTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void testBearerAuthenticationParameters() throws JsonProcessingException {
133133
}
134134

135135
@Test
136-
void testNoneAuthenticationParameters() throws JsonProcessingException {
136+
void testImplicitAuthenticationParameters() throws JsonProcessingException {
137137
// Test deserialization and reserialization of the persistence JSON.
138138
String json =
139139
""
@@ -162,7 +162,7 @@ void testNoneAuthenticationParameters() throws JsonProcessingException {
162162
+ " \"uri\": \"file:///hadoop-catalog/warehouse\","
163163
+ " \"warehouse\": \"hadoop-catalog\","
164164
+ " \"authenticationParameters\": {"
165-
+ " \"authenticationType\": \"NONE\""
165+
+ " \"authenticationType\": \"IMPLICIT\""
166166
+ " }"
167167
+ "}";
168168
Assertions.assertEquals(

service/common/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ private Map<String, UserSecretReference> extractSecretReferences(
704704
private boolean requiresSecretReferenceExtraction(
705705
@NotNull ConnectionConfigInfo connectionConfigInfo) {
706706
return connectionConfigInfo.getAuthenticationParameters().getAuthenticationType()
707-
!= AuthenticationParameters.AuthenticationTypeEnum.NONE;
707+
!= AuthenticationParameters.AuthenticationTypeEnum.IMPLICIT;
708708
}
709709

710710
public PolarisEntity createCatalog(CreateCatalogRequest catalogRequest) {
@@ -768,8 +768,8 @@ public PolarisEntity createCatalog(CreateCatalogRequest catalogRequest) {
768768
// Support no-auth catalog federation only when the feature is enabled.
769769
checkState(
770770
supportedAuthenticationTypes.contains(
771-
AuthenticationParameters.AuthenticationTypeEnum.NONE.name()),
772-
"Authentication-less catalog federation is not supported.");
771+
AuthenticationParameters.AuthenticationTypeEnum.IMPLICIT.name()),
772+
"Implicit authentication based catalog federation is not supported.");
773773
}
774774
entity =
775775
new CatalogEntity.Builder(entity)

spec/polaris-management-service.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ components:
917917
- OAUTH
918918
- BEARER
919919
- SIGV4
920-
- NONE
920+
- IMPLICIT
921921
description: The type of authentication to use when connecting to the remote rest service
922922
required:
923923
- authenticationType
@@ -927,7 +927,7 @@ components:
927927
OAUTH: "#/components/schemas/OAuthClientCredentialsParameters"
928928
BEARER: "#/components/schemas/BearerAuthenticationParameters"
929929
SIGV4: "#/components/schemas/SigV4AuthenticationParameters"
930-
NONE: "#/components/schemas/NoneAuthenticationParameters"
930+
IMPLICIT: "#/components/schemas/ImplicitAuthenticationParameters"
931931

932932
OAuthClientCredentialsParameters:
933933
type: object
@@ -992,9 +992,10 @@ components:
992992
- roleArn
993993
- signingRegion
994994

995-
NoneAuthenticationParameters:
995+
ImplicitAuthenticationParameters:
996996
type: object
997-
description: No authentication required for the connection
997+
description: Polaris does not explicity accept any authentication parameters for the connection. Authentication
998+
parameters found in the environment and/or configuration files will be used for this connection.
998999
allOf:
9991000
- $ref: '#/components/schemas/AuthenticationParameters'
10001001

0 commit comments

Comments
 (0)