Search in sources :

Example 6 with UserAndRoleMap

use of org.apache.druid.security.basic.authorization.entity.UserAndRoleMap in project druid by druid-io.

the class CoordinatorBasicAuthorizerResourceHandler method getCachedUserMaps.

@Override
public Response getCachedUserMaps(String authorizerName) {
    final BasicRoleBasedAuthorizer authorizer = authorizerMap.get(authorizerName);
    if (authorizer == null) {
        return makeResponseForAuthorizerNotFound(authorizerName);
    }
    UserAndRoleMap userAndRoleMap = new UserAndRoleMap(storageUpdater.getCachedUserMap(authorizerName), storageUpdater.getCachedRoleMap(authorizerName));
    return Response.ok(userAndRoleMap).build();
}
Also used : UserAndRoleMap(org.apache.druid.security.basic.authorization.entity.UserAndRoleMap) BasicRoleBasedAuthorizer(org.apache.druid.security.basic.authorization.BasicRoleBasedAuthorizer)

Aggregations

UserAndRoleMap (org.apache.druid.security.basic.authorization.entity.UserAndRoleMap)6 BasicRoleBasedAuthorizer (org.apache.druid.security.basic.authorization.BasicRoleBasedAuthorizer)2 GroupMappingAndRoleMap (org.apache.druid.security.basic.authorization.entity.GroupMappingAndRoleMap)2 IOException (java.io.IOException)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ISE (org.apache.druid.java.util.common.ISE)1 LifecycleStart (org.apache.druid.java.util.common.lifecycle.LifecycleStart)1 Request (org.apache.druid.java.util.http.client.Request)1 BytesFullResponseHandler (org.apache.druid.java.util.http.client.response.BytesFullResponseHandler)1 BytesFullResponseHolder (org.apache.druid.java.util.http.client.response.BytesFullResponseHolder)1 BasicAuthorizerRoleMapBundle (org.apache.druid.security.basic.authorization.entity.BasicAuthorizerRoleMapBundle)1 BasicAuthorizerUserMapBundle (org.apache.druid.security.basic.authorization.entity.BasicAuthorizerUserMapBundle)1 Authorizer (org.apache.druid.server.security.Authorizer)1 AuthorizerMapper (org.apache.druid.server.security.AuthorizerMapper)1 Duration (org.joda.time.Duration)1