Class CertificateVerificator

java.lang.Object
pl.edu.icm.unity.engine.api.authn.AbstractVerificator
pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
pl.edu.icm.unity.stdext.credential.cert.CertificateVerificator
All Implemented Interfaces:
pl.edu.icm.unity.base.describedObject.DescribedObject, pl.edu.icm.unity.base.describedObject.NamedObject, 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

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 
     

    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 final String
     
    static final String
     

    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

    Fields inherited from interface pl.edu.icm.unity.stdext.credential.cert.CertificateExchange

    ID
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    pl.edu.icm.unity.engine.api.authn.AuthenticationResult
    checkCertificate(X509Certificate[] chain, String formForUnknown, boolean enableAssociation, pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext)
     
    pl.edu.icm.unity.base.authn.CredentialPublicInformation
    checkCredentialState(String currentCredential)
     
    pl.edu.icm.unity.base.authn.AuthenticationMethod
     
     
    invalidate(String currentCredential)
     
    boolean
     
    boolean
    isCredentialSet(pl.edu.icm.unity.base.entity.EntityParam entity)
     
    prepareCredential(String rawCredential, String currentCredential, boolean verify)
     
    void
     

    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.base.describedObject.DescribedObject

    getDescription

    Methods inherited from interface pl.edu.icm.unity.base.describedObject.NamedObject

    getName
  • Field Details

  • Constructor Details

    • CertificateVerificator

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

    • getSerializedConfiguration

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

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

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

      public pl.edu.icm.unity.base.authn.CredentialPublicInformation checkCredentialState(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(X509Certificate[] chain, String formForUnknown, boolean enableAssociation, pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext)
      Specified by:
      checkCertificate in interface CertificateExchange
    • invalidate

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

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

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

      public pl.edu.icm.unity.base.authn.AuthenticationMethod getAuthenticationMethod()
      Specified by:
      getAuthenticationMethod in interface pl.edu.icm.unity.engine.api.authn.CredentialVerificator