File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
defaults/src/main/resources
service/src/main/java/org/apache/polaris/service/quarkus/config
service/common/src/main/java/org/apache/polaris/service/auth Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ polaris.rate-limiter.token-bucket.type=default
111111polaris.rate-limiter.token-bucket.requests-per-second =9999
112112polaris.rate-limiter.token-bucket.window =PT10S
113113
114+ polaris.active-roles-provider.type =default
115+
114116polaris.authentication.authenticator.type =default
115117polaris.authentication.token-service.type =default
116118polaris.authentication.token-broker.type =rsa-key-pair
Original file line number Diff line number Diff line change 4747import org .apache .polaris .core .persistence .PolarisMetaStoreSession ;
4848import org .apache .polaris .core .persistence .cache .EntityCache ;
4949import org .apache .polaris .core .storage .cache .StorageCredentialCache ;
50+ import org .apache .polaris .service .auth .ActiveRolesProvider ;
5051import org .apache .polaris .service .auth .Authenticator ;
5152import org .apache .polaris .service .auth .TokenBrokerFactory ;
5253import org .apache .polaris .service .catalog .api .IcebergRestOAuth2ApiService ;
6465import org .apache .polaris .service .ratelimiter .RateLimiter ;
6566import org .apache .polaris .service .ratelimiter .TokenBucketFactory ;
6667import org .apache .polaris .service .task .TaskHandlerConfiguration ;
68+ import org .eclipse .microprofile .config .inject .ConfigProperty ;
6769import org .eclipse .microprofile .context .ManagedExecutor ;
6870import org .eclipse .microprofile .context .ThreadContext ;
6971
@@ -239,6 +241,13 @@ public PolarisEntityManager polarisEntityManager(
239241 return new PolarisEntityManager (polarisMetaStoreManager , credentialCache , entityCache );
240242 }
241243
244+ @ Produces
245+ public ActiveRolesProvider activeRolesProvider (
246+ @ ConfigProperty (name = "polaris.active-roles-provider.type" ) String persistenceType ,
247+ @ Any Instance <ActiveRolesProvider > activeRolesProviders ) {
248+ return activeRolesProviders .select (Identifier .Literal .of (persistenceType )).get ();
249+ }
250+
242251 public void closeTaskExecutor (@ Disposes @ Identifier ("task-executor" ) ManagedExecutor executor ) {
243252 executor .close ();
244253 }
Original file line number Diff line number Diff line change 1818 */
1919package org .apache .polaris .service .auth ;
2020
21+ import io .smallrye .common .annotation .Identifier ;
2122import jakarta .enterprise .context .RequestScoped ;
2223import jakarta .inject .Inject ;
2324import java .util .List ;
4445 * available roles are active for this request.
4546 */
4647@ RequestScoped
48+ @ Identifier ("default" )
4749public class DefaultActiveRolesProvider implements ActiveRolesProvider {
4850 private static final Logger LOGGER = LoggerFactory .getLogger (DefaultActiveRolesProvider .class );
4951
You can’t perform that action at this time.
0 commit comments