Class EvaluableSSLPrincipal

  • Direct Known Subclasses:
    EmptyEvaluableSSLPrincipal

    public class EvaluableSSLPrincipal
    extends Object
    Author:
    Florent CHAMFROY (florent.chamfroy at graviteesource.com), GraviteeSource Team This class allows the TemplateEngine to access SSL attributes using the following syntax: "{#request.ssl.xxx.yyy}", where - xxx can be client or server - yyy can be one of BCStyle ASN1ObjectIdentifier value Examples: {#request.ssl.client.cn} or {#request.ssl.client.role} or {#request.ssl.server.serialnumber} or {#request.ssl.server.o} Even if the DN of a certificate can contain multiple OU and DC attributes, by default, only the first item will be returned. Examples: If DN = "CN=John Doe, OU=Test, OU=Test2, OU=Test3, O=ACME, C=US" Then {#request.ssl.client.ou} => Test To get all values, you may use the attributes field, which is an array {#request.ssl.client.attributes['ou'][0]} => Test {#request.ssl.client.attributes['ou'][1]} => Test2 {#request.ssl.client.attributes['ou'][2]} => Test3
    • Constructor Detail

      • EvaluableSSLPrincipal

        public EvaluableSSLPrincipal​(Principal principal)
    • Method Detail

      • getBusinessCategory

        public String getBusinessCategory()
      • getCn

        public String getCn()
      • getCountryOfCitizenship

        public String getCountryOfCitizenship()
      • getCountryOfResidence

        public String getCountryOfResidence()
      • getDateOfBirth

        public String getDateOfBirth()
      • getDc

        public String getDc()
      • getDescription

        public String getDescription()
      • getDmdName

        public String getDmdName()
      • getDnQualifier

        public String getDnQualifier()
      • getEmailAddress

        public String getEmailAddress()
      • getGender

        public String getGender()
      • getGeneration

        public String getGeneration()
      • getGivenname

        public String getGivenname()
      • getInitials

        public String getInitials()
      • getName

        public String getName()
      • getNameAtBirth

        public String getNameAtBirth()
      • getOrganizationIdentifier

        public String getOrganizationIdentifier()
      • getOu

        public String getOu()
      • getPlaceOfBirth

        public String getPlaceOfBirth()
      • getPostalAddress

        public String getPostalAddress()
      • getPostalCode

        public String getPostalCode()
      • getPseudonym

        public String getPseudonym()
      • getRole

        public String getRole()
      • getSerialnumber

        public String getSerialnumber()
      • getSt

        public String getSt()
      • getStreet

        public String getStreet()
      • getSurname

        public String getSurname()
      • getTelephoneNumber

        public String getTelephoneNumber()
      • getUid

        public String getUid()
      • getUniqueIdentifier

        public String getUniqueIdentifier()
      • getUnstructuredAddress

        public String getUnstructuredAddress()
      • getDn

        public String getDn()
      • getAttributes

        public io.gravitee.common.util.MultiValueMap<String,​String> getAttributes()
        Allow to fetch an attribute from its name (e.g.: CN) or attribute (e.g.: 2.5.4.6). The value returned is always an array of String
        Returns:
        a case insensitive MultiValueMap of all available attributes. Meaning that, if "key" is an existing key, then getAttributes().get("KEY") returns the same value
      • isDefined

        public boolean isDefined()
        Returns:
        true if the principal exists and is defined