Search in sources :

Example 1 with U2FAuthenticationRegistrationRecordCipherExecutor

use of org.apereo.cas.adaptors.u2f.U2FAuthenticationRegistrationRecordCipherExecutor in project cas by apereo.

the class U2FConfiguration method u2fRegistrationRecordCipherExecutor.

@Bean
@RefreshScope
public CipherExecutor u2fRegistrationRecordCipherExecutor() {
    final EncryptionJwtSigningJwtCryptographyProperties crypto = casProperties.getAuthn().getMfa().getU2f().getCrypto();
    if (crypto.isEnabled()) {
        return new U2FAuthenticationRegistrationRecordCipherExecutor(crypto.getEncryption().getKey(), crypto.getSigning().getKey(), crypto.getAlg());
    }
    LOGGER.info("U2F registration record encryption/signing is turned off and " + "MAY NOT be safe in a production environment. " + "Consider using other choices to handle encryption, signing and verification of " + "U2F registration records for MFA");
    return CipherExecutor.noOp();
}
Also used : U2FAuthenticationRegistrationRecordCipherExecutor(org.apereo.cas.adaptors.u2f.U2FAuthenticationRegistrationRecordCipherExecutor) EncryptionJwtSigningJwtCryptographyProperties(org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

U2FAuthenticationRegistrationRecordCipherExecutor (org.apereo.cas.adaptors.u2f.U2FAuthenticationRegistrationRecordCipherExecutor)1 EncryptionJwtSigningJwtCryptographyProperties (org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1