SecurityDomainResourceDefinition(boolean registerRuntimeOnly) { super(new Parameters(SecurityExtension.SECURITY_DOMAIN_PATH, SecurityExtension.getResourceDescriptionResolver(Constants.SECURITY_DOMAIN)) .setAddHandler(SecurityDomainAdd.INSTANCE) .setRemoveHandler(new ServiceRemoveStepHandler(SecurityDomainService.SERVICE_NAME, SecurityDomainAdd.INSTANCE) { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { super.performRuntime(context, operation, model); if (context.isResourceServiceRestartAllowed()) { String cacheType = SecurityDomainAdd.getAuthenticationCacheType(model); String securityDomain = context.getCurrentAddressValue(); if (SecurityDomainResourceDefinition.INFINISPAN_CACHE_TYPE.equals(cacheType)) { for (org.wildfly.clustering.infinispan.spi.InfinispanCacheRequirement requirement : EnumSet.allOf(org.wildfly.clustering.infinispan.spi.InfinispanCacheRequirement.class)) { context.removeService(requirement.getServiceName(context, CACHE_CONTAINER_NAME, securityDomain)); } } } } }) .setCapabilities(LEGACY_SECURITY_DOMAIN)); this.registerRuntimeOnly = registerRuntimeOnly; ApplicationTypeConfig atc = new ApplicationTypeConfig(SecurityExtension.SUBSYSTEM_NAME, Constants.SECURITY_DOMAIN); AccessConstraintDefinition acd = new ApplicationTypeAccessConstraintDefinition(atc); this.accessConstraints = Arrays.asList(SensitiveTargetAccessConstraintDefinition.SECURITY_DOMAIN, acd); setDeprecated(SecurityExtension.DEPRECATED_SINCE); }
KeyStoreDefinition() { super(new Parameters(PathElement.pathElement(ElytronDescriptionConstants.KEY_STORE), RESOURCE_RESOLVER) .setAddHandler(ADD) .setRemoveHandler(REMOVE) .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setCapabilities(KEY_STORE_RUNTIME_CAPABILITY)); }
RoleMapperResourceDefinition(String pathKey, AbstractAddStepHandler add, AttributeDefinition ... attributes) { super(new Parameters(PathElement.pathElement(pathKey), ElytronExtension.getResourceDescriptionResolver(pathKey)) .setAddHandler(add) .setRemoveHandler(new TrivialCapabilityServiceRemoveHandler(add, ROLE_MAPPER_RUNTIME_CAPABILITY)) .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setCapabilities(ROLE_MAPPER_RUNTIME_CAPABILITY)); this.pathKey = pathKey; this.attributes = attributes; }
private EmptyResourceDefinition(String pathKey, RuntimeCapability<?> runtimeCapability, OperationStepHandler add, OperationStepHandler remove) { super(new Parameters(PathElement.pathElement(pathKey), ElytronExtension.getResourceDescriptionResolver(pathKey)) .setAddHandler(add) .setRemoveHandler(remove) .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setCapabilities(runtimeCapability)); }
ProcessStateListenerResourceDefinition() { super(new SimpleResourceDefinition.Parameters(PROCESS_STATE_LISTENER_PATH, CoreManagementExtension.getResourceDescriptionResolver("process-state-listener")) .setOrderedChild() .setCapabilities(PROCESS_STATE_LISTENER_CAPABILITY) .setAddHandler(new ProcessStateListenerResourceDefinition.ProcessStateListenerAddHandler()) .setRemoveHandler(new ProcessStateListenerResourceDefinition.ProcessStateListenerRemoveHandler())); }
KeyStoreRealmDefinition() { super(new Parameters(PathElement.pathElement(ElytronDescriptionConstants.KEY_STORE_REALM), ElytronExtension.getResourceDescriptionResolver(ElytronDescriptionConstants.KEY_STORE_REALM)) .setAddHandler(ADD) .setRemoveHandler(REMOVE) .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setCapabilities(SECURITY_REALM_RUNTIME_CAPABILITY)); }
CredentialStoreResourceDefinition() { super(new Parameters(PathElement.pathElement(ElytronDescriptionConstants.CREDENTIAL_STORE), RESOURCE_RESOLVER) .setAddHandler(ADD) .setRemoveHandler(REMOVE) .setAddRestartLevel(OperationEntry.Flag.RESTART_NONE) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_NONE) .setCapabilities(CREDENTIAL_STORE_RUNTIME_CAPABILITY) ); }
public AbstractSocketBindingGroupResourceDefinition(final OperationStepHandler addHandler, final OperationStepHandler removeHandler, final AttributeDefinition defaultInterface, final RuntimeCapability exposedCapability) { super(new Parameters(PATH, ControllerResolver.getResolver(ModelDescriptionConstants.SOCKET_BINDING_GROUP)) .setAddHandler(addHandler) .setRemoveHandler(removeHandler) .setAccessConstraints(SensitiveTargetAccessConstraintDefinition.SOCKET_CONFIG) .setCapabilities(exposedCapability)); this.defaultInterface = defaultInterface; }
public JdbcJobRepositoryDefinition() { super( new Parameters(PATH, BatchResourceDescriptionResolver.getResourceDescriptionResolver(NAME)) .setAddHandler(new JdbcRepositoryAddHandler()) .setRemoveHandler(new ReloadRequiredRemoveStepHandler(Capabilities.JOB_REPOSITORY_CAPABILITY)) .setCapabilities(Capabilities.JOB_REPOSITORY_CAPABILITY) ); }
private HttpManagementResourceDefinition() { super(new Parameters(RESOURCE_PATH, ServerDescriptions.getResourceDescriptionResolver("core.management.http-interface")) .setAddHandler(HttpManagementAddHandler.INSTANCE) .setRemoveHandler(HttpManagementRemoveHandler.INSTANCE) .setCapabilities(UndertowHttpManagementService.EXTENSIBLE_HTTP_MANAGEMENT_CAPABILITY) ); }
private SecuritySubsystemRootResourceDefinition() { super(new Parameters(SecurityExtension.PATH_SUBSYSTEM, SecurityExtension.getResourceDescriptionResolver(SecurityExtension.SUBSYSTEM_NAME)) .setAddHandler(SecuritySubsystemAdd.INSTANCE) .setRemoveHandler(ReloadRequiredRemoveStepHandler.INSTANCE) .setCapabilities(SECURITY_SUBSYSTEM, SERVER_SECURITY_MANAGER, SUBJECT_FACTORY_CAP)); setDeprecated(SecurityExtension.DEPRECATED_SINCE); }
BasicResourceDefinition(String pathKey, ResourceDescriptionResolver resourceDescriptionResolver, AbstractAddStepHandler add, AttributeDefinition[] attributes, RuntimeCapability<?>... runtimeCapabilities) { super(new Parameters(PathElement.pathElement(pathKey), resourceDescriptionResolver) .setAddHandler(add) .setRemoveHandler(new ServiceRemoveStepHandler(add, runtimeCapabilities)) .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES) .setCapabilities(runtimeCapabilities) .addAccessConstraints(new SensitiveTargetAccessConstraintDefinition(new SensitivityClassification(SecurityExtension.SUBSYSTEM_NAME, Constants.ELYTRON_SECURITY, true, true, true)), new ApplicationTypeAccessConstraintDefinition(new ApplicationTypeConfig(SecurityExtension.SUBSYSTEM_NAME, Constants.ELYTRON_SECURITY, false)))); this.pathKey = pathKey; this.firstCapability = runtimeCapabilities[0]; this.attributes = attributes; }
private IdentityResourceDefinition() { this(new Parameters(EJB3SubsystemModel.IDENTITY_PATH, EJB3Extension.getResourceDescriptionResolver(EJB3SubsystemModel.IDENTITY)) .setCapabilities(IDENTITY_RUNTIME_CAPABILITY), new AddHandler()); }
TransactionSubsystemRootResourceDefinition(boolean registerRuntimeOnly) { super(new Parameters(TransactionExtension.SUBSYSTEM_PATH, TransactionExtension.getResourceDescriptionResolver()) .setAddHandler(TransactionSubsystemAdd.INSTANCE) .setRemoveHandler(TransactionSubsystemRemove.INSTANCE) .setCapabilities(TRANSACTION_CAPABILITY, LOCAL_PROVIDER_CAPABILITY, TRANSACTION_SYNCHRONIZATION_REGISTRY_CAPABILITY, XA_RESOURCE_RECOVERY_REGISTRY_CAPABILITY) // Configuring these is not required as these are defaulted based on our add/remove handler types //OperationEntry.Flag.RESTART_ALL_SERVICES, OperationEntry.Flag.RESTART_ALL_SERVICES ); this.registerRuntimeOnly = registerRuntimeOnly; }
private SecuritySubsystemRootResourceDefinition() { super(new Parameters(SecurityExtension.PATH_SUBSYSTEM, SecurityExtension.getResourceDescriptionResolver(SecurityExtension.SUBSYSTEM_NAME)) .setAddHandler(SecuritySubsystemAdd.INSTANCE) .setRemoveHandler(ReloadRequiredRemoveStepHandler.INSTANCE) .setCapabilities(SECURITY_SUBSYSTEM, SERVER_SECURITY_MANAGER, SUBJECT_FACTORY_CAP)); setDeprecated(SecurityExtension.DEPRECATED_SINCE); }
public JdbcJobRepositoryDefinition() { super( new Parameters(PATH, BatchResourceDescriptionResolver.getResourceDescriptionResolver(NAME)) .setAddHandler(new JdbcRepositoryAddHandler()) .setRemoveHandler(new ReloadRequiredRemoveStepHandler(Capabilities.JOB_REPOSITORY_CAPABILITY)) .setCapabilities(Capabilities.JOB_REPOSITORY_CAPABILITY) ); }
private BeanValidationRootDefinition() { super (new SimpleResourceDefinition.Parameters(BeanValidationExtension.SUBSYSTEM_PATH, BeanValidationExtension.getResolver()) .setAddHandler(BeanValidationSubsystemAdd.INSTANCE) .setRemoveHandler(ReloadRequiredRemoveStepHandler.INSTANCE) .setCapabilities(BEAN_VALIDATION_CAPABILITY) ); }
public InMemoryJobRepositoryDefinition() { super( new Parameters(PATH, BatchResourceDescriptionResolver.getResourceDescriptionResolver(NAME)) .setAddHandler(new InMemoryAddHandler()) .setRemoveHandler(new ReloadRequiredRemoveStepHandler(Capabilities.JOB_REPOSITORY_CAPABILITY)) .setCapabilities(Capabilities.JOB_REPOSITORY_CAPABILITY) ); }
private ApplicationSecurityDomainDefinition() { this(new Parameters(PathElement.pathElement(EJB3SubsystemModel.APPLICATION_SECURITY_DOMAIN), EJB3Extension.getResourceDescriptionResolver(EJB3SubsystemModel.APPLICATION_SECURITY_DOMAIN)) .setCapabilities(APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY) .addAccessConstraints(new SensitiveTargetAccessConstraintDefinition(new SensitivityClassification(EJB3Extension.SUBSYSTEM_NAME, EJB3SubsystemModel.APPLICATION_SECURITY_DOMAIN, false, false, false)), new ApplicationTypeAccessConstraintDefinition(new ApplicationTypeConfig(EJB3Extension.SUBSYSTEM_NAME, EJB3SubsystemModel.APPLICATION_SECURITY_DOMAIN))) , new AddHandler()); }
private JcaSubsystemRootDefinition(final boolean registerRuntimeOnly) { super(new Parameters(PATH_SUBSYSTEM, JcaExtension.getResourceDescriptionResolver()) .setAddHandler(JcaSubsystemAdd.INSTANCE) .setRemoveHandler(JcaSubSystemRemove.INSTANCE) .setCapabilities(TRANSACTION_INTEGRATION_CAPABILITY) ); this.registerRuntimeOnly = registerRuntimeOnly; }