Expression language API - SSO
It is possible to use Java EL expressions in place of attribute values. This enables more complicated techniques available in Java EL syntax for building attribute values, such as concatenation of strings.
The convention used in this Java EL API documentation is:
For top level attributes:
attributeName [AttributeType]
Description of the attribute and its contents.propertyName [PropertyType]
Description of the property.methodName(Parameter1Type parameter1Name,…) [ReturnType]
Description of the method.
For top level functions:
prefix:functionName(Parameter1Type parameter1Name,…) [ReturnType]
Description of the function
Readable variables
Authorization Policy provides a number of variables whose properties can be read, but not written into. The variables are:
Variable | Description |
|---|---|
| Contents depend on the type of the user directory.
|
| Contains all the attributes defined by the authentication method, after attribute mapping (see section 2.3) is applied.
|
| Contains the collection of all authorizer implementations registered in Ubisecure SSO, with their prefixes as keys.[PS1] [AÅ2] |
| Contains the properties of the user in the user directory. Changes to nameID variable are not reflected in this variable.
|
| Contains the following properties.
|
| Contains the following properties originating from a SAML 2 authentication response.
|
Examples of use:
Get user’s CN attribute in the user directory and concatenate it with string ‘@example.com’. Both expressions are equivalent.
${user['cn']}@example.com or ${user.cn[0].concat('@example.com')}
Sends the name of the current template used
${sso.template}
Sends the currently selected user interface locale
${sso.locale}
Sends the currently selected user description decrypted
${server.decrypt(user.description)}
Modifiable variables
Authorization Policy contains two variables, nameID and attribute, which allow modifications to their underlying models.
nameID [NameIDBuider]
(SAML only) The nameID element of the SAML Assertion to be sent to the application.Variable
Description
value(String s) [NameIDBuider]Set the value of the nameID.
format(String s) [NameIDBuider]Set the format of the nameID. Valid values are:
UNSPECIFIED
urn:oasis:names:tc:SAML:1.1:nameid-format:unspecifiedEMAILADDRESS
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressX509SUBJECTNAME
urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectNameWINDOWSDOMAINQUALIFIEDNAME
urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedNameKERBEROS
urn:oasis:names:tc:SAML:2.0:nameid-format:kerberosENTITY
urn:oasis:names:tc:SAML:2.0:nameid-format:entity
nameQualifier(String s) [NameIDBuider]Set the nameQualifier of the nameID.
spNameQualifier(String s) [NameIDBuider]Set the spNameQualifier of the nameID.
spProvidedID(String s) [NameIDBuider]Set the spProvidedID of the nameID.
attribute [AttributeBuilder]
The attribute in current authorization policy context, which will be sent to the application.Variable
Description
name(String s) [AttributeBuilder]Set the name of the attribute. Note that this overrides the setting in authorization policy itself.
values(String s) [AttributeBuilder]Add a value for the attribute.
nameFormat(String s) [AttributeBuilder]Set the nameFormat of the attribute. Valid values are:
UNSPECIFIED
urn:oasis:names:tc:SAML:2.0:attrname-format:unspecifiedURI
urn:oasis:names:tc:SAML:2.0:attrname-format:uriBASIC
urn:oasis:names:tc:SAML:2.0:attrname-format:basic
friendlyName(String s) [AttributeBuilder]Set the friendlyName of the attribute.
authnContext [AuthnContextBuider]
(SAML only) The nameID element of the SAML Assertion to be sent to the application.Variable
Description
authnContextDeclRef(String s) [AuthnContextBuider]Set the value of the AuthnContextDeclRef element.
authnContextClassRef(String s) [AuthnContextBuider]Set the value of the AuthnContextClassRef element.
authenticatingAuthority(List<String> s) [AuthnContextBuider]Set the values of the AuthenticatingAuthority elements.
Examples of use:
Set a value manager to attribute role.