Skip to content

Commit b9f3a16

Browse files
authored
Remove "test" Authenticator (#1399)
1 parent dd223c1 commit b9f3a16

File tree

3 files changed

+0
-254
lines changed

3 files changed

+0
-254
lines changed

quarkus/service/src/main/java/org/apache/polaris/service/quarkus/config/ProductionReadinessChecks.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,15 @@
2626
import java.nio.charset.Charset;
2727
import java.nio.charset.StandardCharsets;
2828
import java.util.List;
29-
import org.apache.polaris.core.auth.AuthenticatedPolarisPrincipal;
3029
import org.apache.polaris.core.config.ProductionReadinessCheck;
3130
import org.apache.polaris.core.config.ProductionReadinessCheck.Error;
3231
import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
3332
import org.apache.polaris.service.auth.AuthenticationConfiguration;
3433
import org.apache.polaris.service.auth.AuthenticationConfiguration.TokenBrokerConfiguration.RSAKeyPairConfiguration;
3534
import org.apache.polaris.service.auth.AuthenticationConfiguration.TokenBrokerConfiguration.SymmetricKeyConfiguration;
36-
import org.apache.polaris.service.auth.Authenticator;
3735
import org.apache.polaris.service.auth.JWTRSAKeyPairFactory;
3836
import org.apache.polaris.service.auth.JWTSymmetricKeyFactory;
39-
import org.apache.polaris.service.auth.TestInlineBearerTokenPolarisAuthenticator;
40-
import org.apache.polaris.service.auth.TestOAuth2ApiService;
4137
import org.apache.polaris.service.auth.TokenBrokerFactory;
42-
import org.apache.polaris.service.catalog.api.IcebergRestOAuth2ApiService;
4338
import org.apache.polaris.service.context.DefaultRealmContextResolver;
4439
import org.apache.polaris.service.context.RealmContextResolver;
4540
import org.apache.polaris.service.context.TestRealmContextResolver;
@@ -84,30 +79,6 @@ public void warnOnFailedChecks(
8479
}
8580
}
8681

87-
@Produces
88-
public ProductionReadinessCheck checkAuthenticator(
89-
Authenticator<String, AuthenticatedPolarisPrincipal> authenticator) {
90-
if (authenticator instanceof TestInlineBearerTokenPolarisAuthenticator) {
91-
return ProductionReadinessCheck.of(
92-
Error.of(
93-
"The current authenticator is intended for tests only.",
94-
"polaris.authentication.authenticator.type"));
95-
}
96-
97-
return ProductionReadinessCheck.OK;
98-
}
99-
100-
@Produces
101-
public ProductionReadinessCheck checkTokenService(IcebergRestOAuth2ApiService service) {
102-
if (service instanceof TestOAuth2ApiService) {
103-
return ProductionReadinessCheck.of(
104-
Error.of(
105-
"The current token service is intended for tests only.",
106-
"polaris.authentication.token-service.type"));
107-
}
108-
return ProductionReadinessCheck.OK;
109-
}
110-
11182
@Produces
11283
public ProductionReadinessCheck checkTokenBroker(
11384
AuthenticationConfiguration configuration, TokenBrokerFactory factory) {

service/common/src/main/java/org/apache/polaris/service/auth/TestInlineBearerTokenPolarisAuthenticator.java

Lines changed: 0 additions & 107 deletions
This file was deleted.

service/common/src/main/java/org/apache/polaris/service/auth/TestOAuth2ApiService.java

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)