use of org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler in project wildfly by wildfly.
the class AuthTokenResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttribute(Attribute.SHARED_SECRET, new CredentialReferenceWriteAttributeHandler(Attribute.SHARED_SECRET.getDefinition())).addCapabilities(Capability.class);
new SimpleResourceRegistration(descriptor, new SimpleResourceServiceHandler(this.serviceConfiguratorFactory)).register(registration);
return registration;
}
use of org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler in project wildfly by wildfly.
the class BridgeDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registry) {
ReloadRequiredWriteAttributeHandler reloadRequiredWriteAttributeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES);
CredentialReferenceWriteAttributeHandler credentialReferenceWriteAttributeHandler = new CredentialReferenceWriteAttributeHandler(CREDENTIAL_REFERENCE);
for (AttributeDefinition attr : ATTRIBUTES) {
if (!attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) {
if (attr.equals(CREDENTIAL_REFERENCE)) {
registry.registerReadWriteAttribute(attr, null, credentialReferenceWriteAttributeHandler);
} else {
registry.registerReadWriteAttribute(attr, null, reloadRequiredWriteAttributeHandler);
}
}
}
BridgeControlHandler.INSTANCE.registerAttributes(registry);
}
use of org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler in project wildfly by wildfly.
the class ApplicationSecurityDomainSingleSignOnDefinition method registerOperations.
@Override
public void registerOperations(ManagementResourceRegistration registration) {
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(EnumSet.complementOf(EnumSet.of(Attribute.CREDENTIAL))).addAttribute(Attribute.CREDENTIAL, new CredentialReferenceWriteAttributeHandler(Attribute.CREDENTIAL.getDefinition())).addAttributes(SingleSignOnDefinition.Attribute.class).addCapabilities(Capability.class);
new ReloadRequiredResourceRegistration(descriptor).register(registration);
}
use of org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler in project wildfly by wildfly.
the class JMSBridgeDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registry) {
ReloadRequiredWriteAttributeHandler reloadRequiredWriteAttributeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES);
CredentialReferenceWriteAttributeHandler credentialReferenceWriteAttributeHandler = new CredentialReferenceWriteAttributeHandler(SOURCE_CREDENTIAL_REFERENCE, TARGET_CREDENTIAL_REFERENCE);
for (AttributeDefinition attr : ATTRIBUTES) {
if (attr.equals(SOURCE_CREDENTIAL_REFERENCE) || attr.equals(TARGET_CREDENTIAL_REFERENCE)) {
registry.registerReadWriteAttribute(attr, null, credentialReferenceWriteAttributeHandler);
} else {
registry.registerReadWriteAttribute(attr, null, reloadRequiredWriteAttributeHandler);
}
}
for (AttributeDefinition attr : READONLY_ATTRIBUTES) {
registry.registerReadOnlyAttribute(attr, JMSBridgeHandler.INSTANCE);
}
for (AttributeDefinition attr : METRICS) {
registry.registerMetric(attr, JMSBridgeHandler.READ_ONLY_INSTANCE);
}
}
use of org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler in project wildfly by wildfly.
the class PooledConnectionFactoryDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registry) {
Collection<AttributeDefinition> definitions = getAttributes();
ReloadRequiredWriteAttributeHandler reloadRequiredWriteAttributeHandler = new ReloadRequiredWriteAttributeHandler(definitions);
CredentialReferenceWriteAttributeHandler credentialReferenceWriteAttributeHandler = new CredentialReferenceWriteAttributeHandler(CREDENTIAL_REFERENCE);
for (AttributeDefinition attr : definitions) {
if (!attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) {
if (deployed) {
registry.registerReadOnlyAttribute(attr, PooledConnectionFactoryConfigurationRuntimeHandler.INSTANCE);
} else {
if (attr.equals(CREDENTIAL_REFERENCE)) {
registry.registerReadWriteAttribute(attr, null, credentialReferenceWriteAttributeHandler);
} else {
registry.registerReadWriteAttribute(attr, null, reloadRequiredWriteAttributeHandler);
}
}
}
}
}
Aggregations