public class CoordinatorBasicAuthorizerMetadataStorageUpdater extends Object implements BasicAuthorizerMetadataStorageUpdater
Modifier and Type | Field and Description |
---|---|
static List<ResourceAction> |
SUPERUSER_PERMISSIONS |
Constructor and Description |
---|
CoordinatorBasicAuthorizerMetadataStorageUpdater(AuthorizerMapper authorizerMapper,
MetadataStorageConnector connector,
MetadataStorageTablesConfig connectorConfig,
BasicAuthCommonCacheConfig commonCacheConfig,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
BasicAuthorizerCacheNotifier cacheNotifier,
ConfigManager configManager) |
Modifier and Type | Method and Description |
---|---|
void |
assignRole(String prefix,
String userName,
String roleName) |
void |
createRole(String prefix,
String roleName) |
void |
createUser(String prefix,
String userName) |
void |
deleteRole(String prefix,
String roleName) |
void |
deleteUser(String prefix,
String userName) |
Map<String,BasicAuthorizerRole> |
getCachedRoleMap(String prefix) |
Map<String,BasicAuthorizerUser> |
getCachedUserMap(String prefix) |
byte[] |
getCurrentRoleMapBytes(String prefix) |
byte[] |
getCurrentUserMapBytes(String prefix) |
void |
refreshAllNotification() |
void |
setPermissions(String prefix,
String roleName,
List<ResourceAction> permissions) |
void |
start() |
void |
stop() |
void |
unassignRole(String prefix,
String userName,
String roleName) |
public static final List<ResourceAction> SUPERUSER_PERMISSIONS
@Inject public CoordinatorBasicAuthorizerMetadataStorageUpdater(AuthorizerMapper authorizerMapper, MetadataStorageConnector connector, MetadataStorageTablesConfig connectorConfig, BasicAuthCommonCacheConfig commonCacheConfig, com.fasterxml.jackson.databind.ObjectMapper objectMapper, BasicAuthorizerCacheNotifier cacheNotifier, ConfigManager configManager)
public void start()
public void stop()
public void createUser(String prefix, String userName)
createUser
in interface BasicAuthorizerMetadataStorageUpdater
public void deleteUser(String prefix, String userName)
deleteUser
in interface BasicAuthorizerMetadataStorageUpdater
public void createRole(String prefix, String roleName)
createRole
in interface BasicAuthorizerMetadataStorageUpdater
public void deleteRole(String prefix, String roleName)
deleteRole
in interface BasicAuthorizerMetadataStorageUpdater
public void assignRole(String prefix, String userName, String roleName)
assignRole
in interface BasicAuthorizerMetadataStorageUpdater
public void unassignRole(String prefix, String userName, String roleName)
unassignRole
in interface BasicAuthorizerMetadataStorageUpdater
public void setPermissions(String prefix, String roleName, List<ResourceAction> permissions)
setPermissions
in interface BasicAuthorizerMetadataStorageUpdater
@Nullable public Map<String,BasicAuthorizerUser> getCachedUserMap(String prefix)
getCachedUserMap
in interface BasicAuthorizerMetadataStorageUpdater
@Nullable public Map<String,BasicAuthorizerRole> getCachedRoleMap(String prefix)
getCachedRoleMap
in interface BasicAuthorizerMetadataStorageUpdater
public byte[] getCurrentUserMapBytes(String prefix)
getCurrentUserMapBytes
in interface BasicAuthorizerMetadataStorageUpdater
public byte[] getCurrentRoleMapBytes(String prefix)
getCurrentRoleMapBytes
in interface BasicAuthorizerMetadataStorageUpdater
public void refreshAllNotification()
refreshAllNotification
in interface BasicAuthorizerMetadataStorageUpdater
Copyright © 2011–2018. All rights reserved.