Search in sources :

Example 6 with GroupMappingAndRoleMap

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

the class CoordinatorBasicAuthorizerResourceHandler method getCachedGroupMappingMaps.

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

Aggregations

GroupMappingAndRoleMap (org.apache.druid.security.basic.authorization.entity.GroupMappingAndRoleMap)6 BasicRoleBasedAuthorizer (org.apache.druid.security.basic.authorization.BasicRoleBasedAuthorizer)2 UserAndRoleMap (org.apache.druid.security.basic.authorization.entity.UserAndRoleMap)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 BasicAuthorizerGroupMappingMapBundle (org.apache.druid.security.basic.authorization.entity.BasicAuthorizerGroupMappingMapBundle)1 BasicAuthorizerRoleMapBundle (org.apache.druid.security.basic.authorization.entity.BasicAuthorizerRoleMapBundle)1 Authorizer (org.apache.druid.server.security.Authorizer)1 AuthorizerMapper (org.apache.druid.server.security.AuthorizerMapper)1 Duration (org.joda.time.Duration)1