use of org.apache.druid.security.basic.authorization.entity.BasicAuthorizerRoleMapBundle in project druid by druid-io.
the class CoordinatorBasicAuthorizerMetadataStorageUpdater method getCurrentGroupMappingAndRoleMapSerialized.
private byte[] getCurrentGroupMappingAndRoleMapSerialized(String prefix) throws IOException {
BasicAuthorizerGroupMappingMapBundle groupMappingMapBundle = cachedGroupMappingMaps.get(prefix);
BasicAuthorizerRoleMapBundle roleMapBundle = cachedRoleMaps.get(prefix);
GroupMappingAndRoleMap groupMappingAndRoleMap = new GroupMappingAndRoleMap(groupMappingMapBundle == null ? null : groupMappingMapBundle.getGroupMappingMap(), roleMapBundle == null ? null : roleMapBundle.getRoleMap());
return objectMapper.writeValueAsBytes(groupMappingAndRoleMap);
}
Aggregations