public class WSSUtils extends Object
Modifier and Type | Field and Description |
---|---|
static ResourceBundle |
bundle |
static Debug |
debug |
Constructor and Description |
---|
WSSUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.xml.security.encryption.EncryptedKey |
encryptKey(Document doc,
byte[] encryptedKey,
X509Certificate cert,
String keyWrapAlgorithm) |
static SSOToken |
getAdminToken() |
static Map |
getAgentAttributes(String endpoint,
Set attrNames,
String type) |
static String |
getAuthMethodURI(String authModuleName)
Returns corresponding Authentication method URI to be set in Assertion.
|
static Element |
getCanonicalElement(Node node)
Gets input Node Canonicalized
|
static String |
getCertAlias(String issuer)
Returns the trusted certificate alias from the issuer.
|
static X509Certificate |
getCertificate(Element keyinfo) |
static X509Certificate |
getCertificate(SecurityToken securityToken)
Returns the certificate present in the security token.
|
static ProviderConfig |
getConfigByDnsClaim(String dnsClaim,
String agentType) |
static Node |
getDirectChild(Node fNode,
String localName,
String namespace) |
static Map<QName,List<String>> |
getMembershipAttributes(String subjectName,
String namespace)
Returns the membership attributes for the given subject.
|
static List |
getMemberShips(String pattern) |
static X509Certificate |
getMessageCertificate(Element sigElement)
Returns the message certificate from the security token reference
especially for KeyIdentifier and X509IssuerSerial case.
|
static Map<QName,List<String>> |
getRequestedClaims(String subjectName,
Set claimNames,
SSOToken ssoToken)
Returns the list of requested claims for the given subject
|
static Map<QName,List<String>> |
getSAMLAttributes(String subjectName,
Set attributeNames,
String namespace,
SSOToken ssoToken)
Returns the SAML Attribute Map
|
static Key |
getSecretKey(SecurityToken securityToken,
String certAlias)
Returns the secret key from the security token from SAML1 Assertion.
|
static long |
getTimeSkew() |
static String |
getUserPseduoName(String userName,
String nameIDImpl)
Returns the user pseduo name from the given nameid mapper.
|
static WSSCacheRepository |
getWSSCacheRepository() |
static XMLEncryptionManager |
getXMLEncryptionManager() |
static XMLSignatureManager |
getXMLSignatureManager() |
static Element |
prependChildElement(Element parent,
Element child,
boolean addWhitespace,
Document doc) |
static String |
print(Node node) |
static void |
setRoles(Subject subject,
String user)
Sets the memberships for a given user into the JAAS Subject.
|
static SOAPMessage |
toSOAPMessage(Document document) |
public static ResourceBundle bundle
public static Debug debug
public static X509Certificate getCertificate(SecurityToken securityToken) throws SecurityException
securityToken
- the security token.SecurityException
public static X509Certificate getCertificate(Element keyinfo)
public static SOAPMessage toSOAPMessage(Document document)
public static Element prependChildElement(Element parent, Element child, boolean addWhitespace, Document doc)
public static XMLEncryptionManager getXMLEncryptionManager()
public static XMLSignatureManager getXMLSignatureManager()
public static String getAuthMethodURI(String authModuleName)
authModuleName
- name of the authentication module used to
authenticate the user.public static void setRoles(Subject subject, String user)
subject
- the JAAS subject where the role memberships need
to be set.user
- the user's universal dnpublic static Map getAgentAttributes(String endpoint, Set attrNames, String type)
public static SSOToken getAdminToken()
public static X509Certificate getMessageCertificate(Element sigElement)
sigElement
- the signature element where the security token
ref is presentpublic static WSSCacheRepository getWSSCacheRepository()
public static Map<QName,List<String>> getSAMLAttributes(String subjectName, Set attributeNames, String namespace, SSOToken ssoToken)
subjectName
- the principal to be used for retrieving the user
attributes.attributeNames
- set of attribute names for the attribute mapnamespace
- the name space for the saml attribute namessoToken
- the user's SSOToken.public static String getUserPseduoName(String userName, String nameIDImpl)
userName
- the authenticated user name.nameIDImpl
- the nameid mapper implementation classpublic static Map<QName,List<String>> getMembershipAttributes(String subjectName, String namespace)
subjectName
- the authenticated subjectnamespace
- the saml attribute namespace.public static long getTimeSkew()
public static org.apache.xml.security.encryption.EncryptedKey encryptKey(Document doc, byte[] encryptedKey, X509Certificate cert, String keyWrapAlgorithm)
public static Key getSecretKey(SecurityToken securityToken, String certAlias) throws SecurityException
SecurityException
public static String getCertAlias(String issuer)
public static Map<QName,List<String>> getRequestedClaims(String subjectName, Set claimNames, SSOToken ssoToken)
subjectName
- the subject nameclaimNames
- the set of requested claimsssoToken
- the user's single sign-on token.public static ProviderConfig getConfigByDnsClaim(String dnsClaim, String agentType)
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.