public DelegatingConfigurableAuthorizer() { this.writableAuthorizerConfiguration = new WritableAuthorizerConfiguration(StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION); this.delegate = StandardRBACAuthorizer.create(writableAuthorizerConfiguration, new SuperUserRoleMapper(writableAuthorizerConfiguration)); }
public DelegatingConfigurableAuthorizer() { this.writableAuthorizerConfiguration = new WritableAuthorizerConfiguration(StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION); this.delegate = StandardRBACAuthorizer.create(writableAuthorizerConfiguration, new SuperUserRoleMapper(writableAuthorizerConfiguration)); }
public DelegatingConfigurableAuthorizer() { this.writableAuthorizerConfiguration = new WritableAuthorizerConfiguration(StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION); this.delegate = StandardRBACAuthorizer.create(writableAuthorizerConfiguration, new SuperUserRoleMapper(writableAuthorizerConfiguration)); }
static void updateAuthorizer(final ModelNode value, final DelegatingConfigurableAuthorizer configurableAuthorizer) { ModelNode resolvedValue = value.isDefined() ? value : AccessAuthorizationResourceDefinition.PROVIDER.getDefaultValue(); String providerName = resolvedValue.asString().toUpperCase(Locale.ENGLISH); Provider provider = Provider.valueOf(providerName); AuthorizerConfiguration authorizerConfiguration = configurableAuthorizer.getWritableAuthorizerConfiguration(); RoleMapper roleMapper; if (provider == Provider.SIMPLE) { roleMapper = new SuperUserRoleMapper(authorizerConfiguration); } else { roleMapper = new StandardRoleMapper(configurableAuthorizer.getWritableAuthorizerConfiguration()); } Authorizer delegate = StandardRBACAuthorizer.create(configurableAuthorizer.getWritableAuthorizerConfiguration(), roleMapper); configurableAuthorizer.setDelegate(delegate); }
static void updateAuthorizer(final ModelNode value, final DelegatingConfigurableAuthorizer configurableAuthorizer) { ModelNode resolvedValue = value.isDefined() ? value : AccessAuthorizationResourceDefinition.PROVIDER.getDefaultValue(); String providerName = resolvedValue.asString().toUpperCase(Locale.ENGLISH); Provider provider = Provider.valueOf(providerName); AuthorizerConfiguration authorizerConfiguration = configurableAuthorizer.getWritableAuthorizerConfiguration(); RoleMapper roleMapper; if (provider == Provider.SIMPLE) { roleMapper = new SuperUserRoleMapper(authorizerConfiguration); } else { roleMapper = new StandardRoleMapper(configurableAuthorizer.getWritableAuthorizerConfiguration()); } Authorizer delegate = StandardRBACAuthorizer.create(configurableAuthorizer.getWritableAuthorizerConfiguration(), roleMapper); configurableAuthorizer.setDelegate(delegate); }