Class CertificateVerificator

  • All Implemented Interfaces:
    pl.edu.icm.unity.engine.api.authn.CredentialExchange, pl.edu.icm.unity.engine.api.authn.CredentialVerificator, pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator, pl.edu.icm.unity.engine.api.utils.StringConfigurable, CertificateExchange, pl.edu.icm.unity.types.DescribedObject, pl.edu.icm.unity.types.NamedObject

    public class CertificateVerificator
    extends pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
    implements CertificateExchange
    Trivial verificator of certificates. It is assumed that the certificate was previously authenticated. Therefore the only operation is resolving of the certificate user.

    There is no local credential associated with this verificator. Therefore it always returns the correct credential state. Storing credential of this type makes no sense, but works (empty string is stored).

    Author:
    K. Benedyczak
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CertificateVerificator.Factory  
      • Nested classes/interfaces inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialVerificator

        pl.edu.icm.unity.engine.api.authn.CredentialVerificator.VerificatorType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DESC  
      static java.lang.String NAME  
      • Fields inherited from class pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator

        credentialName
      • Fields inherited from class pl.edu.icm.unity.engine.api.authn.AbstractVerificator

        identityResolver, instanceName
    • Constructor Summary

      Constructors 
      Constructor Description
      CertificateVerificator​(pl.edu.icm.unity.engine.api.EntityManagement idMan)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      pl.edu.icm.unity.engine.api.authn.AuthenticationResult checkCertificate​(java.security.cert.X509Certificate[] chain, java.lang.String formForUnknown, boolean enableAssociation, pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext)  
      pl.edu.icm.unity.types.authn.CredentialPublicInformation checkCredentialState​(java.lang.String currentCredential)  
      java.lang.String getSerializedConfiguration()  
      java.lang.String invalidate​(java.lang.String currentCredential)  
      boolean isCredentialDefinitionChagneOutdatingCredentials​(java.lang.String newCredentialDefinition)  
      boolean isCredentialSet​(pl.edu.icm.unity.types.basic.EntityParam entity)  
      java.lang.String prepareCredential​(java.lang.String rawCredential, java.lang.String currentCredential, boolean verify)  
      void setSerializedConfiguration​(java.lang.String json)  
      • Methods inherited from class pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator

        getCredentialName, getType, isSupportingInvalidation, setCredentialName, updateCredentialAfterConfigurationChange
      • Methods inherited from class pl.edu.icm.unity.engine.api.authn.AbstractVerificator

        getDescription, getExchangeId, getName, setIdentityResolver, setInstanceName
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialExchange

        getExchangeId
      • Methods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialVerificator

        setIdentityResolver, setInstanceName
      • Methods inherited from interface pl.edu.icm.unity.types.DescribedObject

        getDescription
      • Methods inherited from interface pl.edu.icm.unity.types.NamedObject

        getName
    • Constructor Detail

      • CertificateVerificator

        @Autowired
        public CertificateVerificator​(@Qualifier("insecure")
                                      pl.edu.icm.unity.engine.api.EntityManagement idMan)
    • Method Detail

      • getSerializedConfiguration

        public java.lang.String getSerializedConfiguration()
        Specified by:
        getSerializedConfiguration in interface pl.edu.icm.unity.engine.api.utils.StringConfigurable
      • setSerializedConfiguration

        public void setSerializedConfiguration​(java.lang.String json)
        Specified by:
        setSerializedConfiguration in interface pl.edu.icm.unity.engine.api.utils.StringConfigurable
      • prepareCredential

        public java.lang.String prepareCredential​(java.lang.String rawCredential,
                                                  java.lang.String currentCredential,
                                                  boolean verify)
                                           throws pl.edu.icm.unity.exceptions.IllegalCredentialException
        Specified by:
        prepareCredential in interface pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
        Throws:
        pl.edu.icm.unity.exceptions.IllegalCredentialException
      • checkCredentialState

        public pl.edu.icm.unity.types.authn.CredentialPublicInformation checkCredentialState​(java.lang.String currentCredential)
        Specified by:
        checkCredentialState in interface pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
      • checkCertificate

        public pl.edu.icm.unity.engine.api.authn.AuthenticationResult checkCertificate​(java.security.cert.X509Certificate[] chain,
                                                                                       java.lang.String formForUnknown,
                                                                                       boolean enableAssociation,
                                                                                       pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext)
        Specified by:
        checkCertificate in interface CertificateExchange
      • invalidate

        public java.lang.String invalidate​(java.lang.String currentCredential)
        Specified by:
        invalidate in interface pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
      • isCredentialSet

        public boolean isCredentialSet​(pl.edu.icm.unity.types.basic.EntityParam entity)
                                throws pl.edu.icm.unity.exceptions.EngineException
        Specified by:
        isCredentialSet in interface pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • isCredentialDefinitionChagneOutdatingCredentials

        public boolean isCredentialDefinitionChagneOutdatingCredentials​(java.lang.String newCredentialDefinition)
        Specified by:
        isCredentialDefinitionChagneOutdatingCredentials in interface pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator