Skip to content

Remove "test" Authenticator #1399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,15 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.List;
import org.apache.polaris.core.auth.AuthenticatedPolarisPrincipal;
import org.apache.polaris.core.config.ProductionReadinessCheck;
import org.apache.polaris.core.config.ProductionReadinessCheck.Error;
import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
import org.apache.polaris.service.auth.AuthenticationConfiguration;
import org.apache.polaris.service.auth.AuthenticationConfiguration.TokenBrokerConfiguration.RSAKeyPairConfiguration;
import org.apache.polaris.service.auth.AuthenticationConfiguration.TokenBrokerConfiguration.SymmetricKeyConfiguration;
import org.apache.polaris.service.auth.Authenticator;
import org.apache.polaris.service.auth.JWTRSAKeyPairFactory;
import org.apache.polaris.service.auth.JWTSymmetricKeyFactory;
import org.apache.polaris.service.auth.TestInlineBearerTokenPolarisAuthenticator;
import org.apache.polaris.service.auth.TestOAuth2ApiService;
import org.apache.polaris.service.auth.TokenBrokerFactory;
import org.apache.polaris.service.catalog.api.IcebergRestOAuth2ApiService;
import org.apache.polaris.service.context.DefaultRealmContextResolver;
import org.apache.polaris.service.context.RealmContextResolver;
import org.apache.polaris.service.context.TestRealmContextResolver;
Expand Down Expand Up @@ -84,30 +79,6 @@ public void warnOnFailedChecks(
}
}

@Produces
public ProductionReadinessCheck checkAuthenticator(
Authenticator<String, AuthenticatedPolarisPrincipal> authenticator) {
if (authenticator instanceof TestInlineBearerTokenPolarisAuthenticator) {
return ProductionReadinessCheck.of(
Error.of(
"The current authenticator is intended for tests only.",
"polaris.authentication.authenticator.type"));
}

return ProductionReadinessCheck.OK;
}

@Produces
public ProductionReadinessCheck checkTokenService(IcebergRestOAuth2ApiService service) {
if (service instanceof TestOAuth2ApiService) {
return ProductionReadinessCheck.of(
Error.of(
"The current token service is intended for tests only.",
"polaris.authentication.token-service.type"));
}
return ProductionReadinessCheck.OK;
}

@Produces
public ProductionReadinessCheck checkTokenBroker(
AuthenticationConfiguration configuration, TokenBrokerFactory factory) {
Expand Down

This file was deleted.

This file was deleted.