diff --git a/CHANGELOG.md b/CHANGELOG.md index fdbe0c1b0f..865770a44e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,9 +55,8 @@ at locations that better optimize for object storage. ### Deprecations -* The property `polaris.active-roles-provider.type` is deprecated in favor of - `polaris.authentication.active-roles-provider.type`. The old property is still supported, but will be removed in a - future release. +- The property `polaris.active-roles-provider.type` is deprecated for removal. +- The `ActiveRolesProvider` interface is deprecated for removal. ### Fixes diff --git a/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesAugmentor.java b/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesAugmentor.java index 48abac56b0..811ddbac7e 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesAugmentor.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesAugmentor.java @@ -35,6 +35,7 @@ * authentication. */ @ApplicationScoped +@Deprecated public class ActiveRolesAugmentor implements SecurityIdentityAugmentor { // must run after AuthenticatingAugmentor diff --git a/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesProvider.java b/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesProvider.java index 43bbb9c2b9..effbb834bb 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesProvider.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/auth/ActiveRolesProvider.java @@ -25,6 +25,7 @@ * Provides the active roles for a given principal. Implementations may rely on the active request * or SecurityContext to determine the active roles. */ +@Deprecated public interface ActiveRolesProvider { /** * Returns the active roles for the given principal. diff --git a/runtime/service/src/main/java/org/apache/polaris/service/auth/AuthenticationRealmConfiguration.java b/runtime/service/src/main/java/org/apache/polaris/service/auth/AuthenticationRealmConfiguration.java index b61bad9453..716ab6d1d2 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/auth/AuthenticationRealmConfiguration.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/auth/AuthenticationRealmConfiguration.java @@ -49,6 +49,7 @@ interface AuthenticatorConfiguration { * The configuration for the active roles provider. The active roles provider is responsible for * determining the active roles for a given Polaris principal. */ + @Deprecated ActiveRolesProviderConfiguration activeRolesProvider(); interface ActiveRolesProviderConfiguration { diff --git a/runtime/service/src/main/java/org/apache/polaris/service/auth/DefaultActiveRolesProvider.java b/runtime/service/src/main/java/org/apache/polaris/service/auth/DefaultActiveRolesProvider.java index f0bc6c7cb0..003b37bcd9 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/auth/DefaultActiveRolesProvider.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/auth/DefaultActiveRolesProvider.java @@ -48,6 +48,7 @@ */ @RequestScoped @Identifier("default") +@Deprecated public class DefaultActiveRolesProvider implements ActiveRolesProvider { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultActiveRolesProvider.class); diff --git a/runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java b/runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java index 900960f08d..3cf0c0dbaf 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java @@ -384,6 +384,7 @@ public AuthenticationRealmConfiguration realmAuthConfig( } @Produces + @Deprecated public ActiveRolesProvider activeRolesProvider( AuthenticationRealmConfiguration config, @Any Instance activeRolesProviders) { diff --git a/runtime/service/src/test/java/org/apache/polaris/service/auth/ActiveRolesAugmentorTest.java b/runtime/service/src/test/java/org/apache/polaris/service/auth/ActiveRolesAugmentorTest.java index 932a9ff8c4..8d6e2d6bfe 100644 --- a/runtime/service/src/test/java/org/apache/polaris/service/auth/ActiveRolesAugmentorTest.java +++ b/runtime/service/src/test/java/org/apache/polaris/service/auth/ActiveRolesAugmentorTest.java @@ -35,6 +35,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +@SuppressWarnings("deprecation") public class ActiveRolesAugmentorTest { private ActiveRolesAugmentor augmentor;