Class AttributeQueryClaimsHandler
java.lang.Object
org.codice.ddf.security.claims.attributequery.common.AttributeQueryClaimsHandler
- All Implemented Interfaces:
ddf.security.claims.ClaimsHandler
public class AttributeQueryClaimsHandler
extends Object
implements ddf.security.claims.ClaimsHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeQueryClientcreateAttributeQueryClient(ddf.security.samlp.impl.SimpleSign simpleSign, String externalAttributeStoreUrl, String issuer, String destination) Creates a client to interface with an external attribute store via an AttributeQuery request.protected ddf.security.claims.ClaimsCollectioncreateClaims(ddf.security.claims.ClaimsCollection claimsCollection, org.opensaml.saml.saml2.core.Assertion assertion) Creates claims from the extracted attributes.protected javax.xml.ws.Dispatch<StreamSource> createDispatcher(javax.xml.ws.Service service) Creates a dispatcher for dispatching requests.protected final javax.xml.ws.ServiceCreates a dynamic service from the provided wsdl location.protected ddf.security.claims.ClaimcreateSingleValuedClaim(String claimType, String claimValue) Creates a single valued claim.protected ddf.security.claims.ClaimsCollectiongetAttributes(String nameId) Gets the attributes for the supplied user from the external attribute store.protected StringRetrieve the name from the principal.ddf.security.claims.ClaimsCollectionretrieveClaims(ddf.security.claims.ClaimsParameters parameters) Retrieves claims from the external attribute store.voidsetAttributeMapLocation(String attributeMapLocation) voidsetDestination(String destination) voidsetEncryptionPropertiesLocation(String encryptionPropertiesLocation) voidsetExternalAttributeStoreUrl(String externalAttributeStoreUrl) voidvoidsetPortName(String portName) voidsetSecurityLogger(ddf.security.audit.SecurityLogger securityLogger) voidsetServiceName(String serviceName) voidsetSignaturePropertiesLocation(String signaturePropertiesLocation) voidsetSimpleSign(ddf.security.samlp.impl.SimpleSign simpleSign) voidsetSupportedClaims(List<String> supportedClaims) voidsetWsdlLocation(String wsdlLocation)
-
Field Details
-
ERROR_RETRIEVING_ATTRIBUTES
- See Also:
-
simpleSign
protected ddf.security.samlp.impl.SimpleSign simpleSign -
externalAttributeStoreUrl
-
issuer
-
destination
-
-
Constructor Details
-
AttributeQueryClaimsHandler
public AttributeQueryClaimsHandler()
-
-
Method Details
-
retrieveClaims
public ddf.security.claims.ClaimsCollection retrieveClaims(ddf.security.claims.ClaimsParameters parameters) Retrieves claims from the external attribute store.- Specified by:
retrieveClaimsin interfaceddf.security.claims.ClaimsHandler- Parameters:
parameters- The subject to get claims for.- Returns:
- The collection of claims or an empty collection if there are no security claims.
- Throws:
URISyntaxException
-
getNameId
Retrieve the name from the principal.- Parameters:
principal- of the user.- Returns:
- CN of the user.
-
getAttributes
protected ddf.security.claims.ClaimsCollection getAttributes(String nameId) throws URISyntaxException Gets the attributes for the supplied user from the external attribute store. Returns null if the AttributeQueryClient is null.- Parameters:
nameId- used for the request.- Returns:
- The collection of attributes retrieved from the external attribute store.
- Throws:
URISyntaxException
-
createClaims
protected ddf.security.claims.ClaimsCollection createClaims(ddf.security.claims.ClaimsCollection claimsCollection, org.opensaml.saml.saml2.core.Assertion assertion) Creates claims from the extracted attributes.- Parameters:
claimsCollection- The collection of claims.assertion- Assertion from the response.- Returns:
- The collection of claims.
- Throws:
URISyntaxException
-
createSingleValuedClaim
Creates a single valued claim.- Parameters:
claimType- The claim type.claimValue- The claim value.- Returns:
- The claim.
- Throws:
URISyntaxException
-
createAttributeQueryClient
protected AttributeQueryClient createAttributeQueryClient(ddf.security.samlp.impl.SimpleSign simpleSign, String externalAttributeStoreUrl, String issuer, String destination) Creates a client to interface with an external attribute store via an AttributeQuery request.- Parameters:
simpleSign- to create signature for requestexternalAttributeStoreUrl- endpoint of external web serviceissuer- of requestdestination- of request- Returns:
- AttributeQueryClient
-
createService
protected final javax.xml.ws.Service createService()Creates a dynamic service from the provided wsdl location. -
createDispatcher
Creates a dispatcher for dispatching requests. -
setSignaturePropertiesLocation
-
setEncryptionPropertiesLocation
-
setWsdlLocation
-
setServiceName
-
setPortName
-
setSimpleSign
public void setSimpleSign(ddf.security.samlp.impl.SimpleSign simpleSign) -
setExternalAttributeStoreUrl
-
setIssuer
-
setDestination
-
setAttributeMapLocation
-
setSupportedClaims
-
setSecurityLogger
public void setSecurityLogger(ddf.security.audit.SecurityLogger securityLogger)
-