org.wildfly.swarm.config.elytron.SecurityDomain Maven / Gradle / Ivy
package org.wildfly.swarm.config.elytron;
import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Address;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;
import java.util.List;
import java.util.Arrays;
import java.util.stream.Collectors;
import java.util.Map;
/**
* A security domain definition.
*/
@Address("/subsystem=elytron/security-domain=*")
@ResourceType("security-domain")
public class SecurityDomain>
implements
org.wildfly.swarm.config.runtime.Keyed {
private String key;
private PropertyChangeSupport pcs;
@AttributeDocumentation("The default realm contained by this security domain.")
private String defaultRealm;
@AttributeDocumentation("A reference to an EvidenceDecoder to be used by this domain.")
private String evidenceDecoder;
@AttributeDocumentation("When outflowing to a security domain if outflow is not possible should the anonymous identity be used? Outflowing anonymous has the effect of clearing any identity already established for that domain.")
private Boolean outflowAnonymous;
@AttributeDocumentation("The list of security domains that the security identity from this domain should automatically outflow to.")
private List outflowSecurityDomains;
@AttributeDocumentation("A reference to a PermissionMapper to be used by this domain.")
private String permissionMapper;
@AttributeDocumentation("A reference to a principal transformer to be applied after the realm has operated on the supplied identity name.")
private String postRealmPrincipalTransformer;
@AttributeDocumentation("A reference to a principal transformer to be applied before the realm is selected.")
private String preRealmPrincipalTransformer;
@AttributeDocumentation("A reference to a PrincipalDecoder to be used by this domain.")
private String principalDecoder;
@AttributeDocumentation("Reference to the RealmMapper to be used by this domain.")
private String realmMapper;
@AttributeDocumentation("The list of realms contained by this security domain.")
private List realms;
@AttributeDocumentation("Reference to the RoleMapper to be used by this domain.")
private String roleMapper;
@AttributeDocumentation("Reference to a listener for security events.")
private String securityEventListener;
@AttributeDocumentation("The list of security domains that are trusted by this security domain.")
private List trustedSecurityDomains;
public SecurityDomain(java.lang.String key) {
super();
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Adds a property change listener
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (null == this.pcs)
this.pcs = new PropertyChangeSupport(this);
this.pcs.addPropertyChangeListener(listener);
}
/**
* Removes a property change listener
*/
public void removePropertyChangeListener(
java.beans.PropertyChangeListener listener) {
if (this.pcs != null)
this.pcs.removePropertyChangeListener(listener);
}
/**
* The default realm contained by this security domain.
*/
@ModelNodeBinding(detypedName = "default-realm")
public String defaultRealm() {
return this.defaultRealm;
}
/**
* The default realm contained by this security domain.
*/
@SuppressWarnings("unchecked")
public T defaultRealm(java.lang.String value) {
Object oldValue = this.defaultRealm;
this.defaultRealm = value;
if (this.pcs != null)
this.pcs.firePropertyChange("defaultRealm", oldValue, value);
return (T) this;
}
/**
* A reference to an EvidenceDecoder to be used by this domain.
*/
@ModelNodeBinding(detypedName = "evidence-decoder")
public String evidenceDecoder() {
return this.evidenceDecoder;
}
/**
* A reference to an EvidenceDecoder to be used by this domain.
*/
@SuppressWarnings("unchecked")
public T evidenceDecoder(java.lang.String value) {
Object oldValue = this.evidenceDecoder;
this.evidenceDecoder = value;
if (this.pcs != null)
this.pcs.firePropertyChange("evidenceDecoder", oldValue, value);
return (T) this;
}
/**
* When outflowing to a security domain if outflow is not possible should
* the anonymous identity be used? Outflowing anonymous has the effect of
* clearing any identity already established for that domain.
*/
@ModelNodeBinding(detypedName = "outflow-anonymous")
public Boolean outflowAnonymous() {
return this.outflowAnonymous;
}
/**
* When outflowing to a security domain if outflow is not possible should
* the anonymous identity be used? Outflowing anonymous has the effect of
* clearing any identity already established for that domain.
*/
@SuppressWarnings("unchecked")
public T outflowAnonymous(java.lang.Boolean value) {
Object oldValue = this.outflowAnonymous;
this.outflowAnonymous = value;
if (this.pcs != null)
this.pcs.firePropertyChange("outflowAnonymous", oldValue, value);
return (T) this;
}
/**
* The list of security domains that the security identity from this domain
* should automatically outflow to.
*/
@ModelNodeBinding(detypedName = "outflow-security-domains")
public List outflowSecurityDomains() {
return this.outflowSecurityDomains;
}
/**
* The list of security domains that the security identity from this domain
* should automatically outflow to.
*/
@SuppressWarnings("unchecked")
public T outflowSecurityDomains(java.util.List value) {
Object oldValue = this.outflowSecurityDomains;
this.outflowSecurityDomains = value;
if (this.pcs != null)
this.pcs.firePropertyChange("outflowSecurityDomains", oldValue,
value);
return (T) this;
}
/**
* The list of security domains that the security identity from this domain
* should automatically outflow to.
*/
@SuppressWarnings("unchecked")
public T outflowSecurityDomain(String value) {
if (this.outflowSecurityDomains == null) {
this.outflowSecurityDomains = new java.util.ArrayList<>();
}
this.outflowSecurityDomains.add(value);
return (T) this;
}
/**
* The list of security domains that the security identity from this domain
* should automatically outflow to.
*/
@SuppressWarnings("unchecked")
public T outflowSecurityDomains(String... args) {
outflowSecurityDomains(Arrays.stream(args).collect(Collectors.toList()));
return (T) this;
}
/**
* A reference to a PermissionMapper to be used by this domain.
*/
@ModelNodeBinding(detypedName = "permission-mapper")
public String permissionMapper() {
return this.permissionMapper;
}
/**
* A reference to a PermissionMapper to be used by this domain.
*/
@SuppressWarnings("unchecked")
public T permissionMapper(java.lang.String value) {
Object oldValue = this.permissionMapper;
this.permissionMapper = value;
if (this.pcs != null)
this.pcs.firePropertyChange("permissionMapper", oldValue, value);
return (T) this;
}
/**
* A reference to a principal transformer to be applied after the realm has
* operated on the supplied identity name.
*/
@ModelNodeBinding(detypedName = "post-realm-principal-transformer")
public String postRealmPrincipalTransformer() {
return this.postRealmPrincipalTransformer;
}
/**
* A reference to a principal transformer to be applied after the realm has
* operated on the supplied identity name.
*/
@SuppressWarnings("unchecked")
public T postRealmPrincipalTransformer(java.lang.String value) {
Object oldValue = this.postRealmPrincipalTransformer;
this.postRealmPrincipalTransformer = value;
if (this.pcs != null)
this.pcs.firePropertyChange("postRealmPrincipalTransformer",
oldValue, value);
return (T) this;
}
/**
* A reference to a principal transformer to be applied before the realm is
* selected.
*/
@ModelNodeBinding(detypedName = "pre-realm-principal-transformer")
public String preRealmPrincipalTransformer() {
return this.preRealmPrincipalTransformer;
}
/**
* A reference to a principal transformer to be applied before the realm is
* selected.
*/
@SuppressWarnings("unchecked")
public T preRealmPrincipalTransformer(java.lang.String value) {
Object oldValue = this.preRealmPrincipalTransformer;
this.preRealmPrincipalTransformer = value;
if (this.pcs != null)
this.pcs.firePropertyChange("preRealmPrincipalTransformer",
oldValue, value);
return (T) this;
}
/**
* A reference to a PrincipalDecoder to be used by this domain.
*/
@ModelNodeBinding(detypedName = "principal-decoder")
public String principalDecoder() {
return this.principalDecoder;
}
/**
* A reference to a PrincipalDecoder to be used by this domain.
*/
@SuppressWarnings("unchecked")
public T principalDecoder(java.lang.String value) {
Object oldValue = this.principalDecoder;
this.principalDecoder = value;
if (this.pcs != null)
this.pcs.firePropertyChange("principalDecoder", oldValue, value);
return (T) this;
}
/**
* Reference to the RealmMapper to be used by this domain.
*/
@ModelNodeBinding(detypedName = "realm-mapper")
public String realmMapper() {
return this.realmMapper;
}
/**
* Reference to the RealmMapper to be used by this domain.
*/
@SuppressWarnings("unchecked")
public T realmMapper(java.lang.String value) {
Object oldValue = this.realmMapper;
this.realmMapper = value;
if (this.pcs != null)
this.pcs.firePropertyChange("realmMapper", oldValue, value);
return (T) this;
}
/**
* The list of realms contained by this security domain.
*/
@ModelNodeBinding(detypedName = "realms")
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy