Search in sources :

Example 1 with CertificateHealthCheckDto

use of uk.gov.ida.hub.config.dto.CertificateHealthCheckDto in project verify-hub by alphagov.

the class CertificatesResource method getCertHealthCheckDtos.

private List<CertificateHealthCheckDto> getCertHealthCheckDtos() throws CertificateException {
    List<CertificateHealthCheckDto> certs = new LinkedList<>();
    // IDP certs are now in the federation metadata and checked for expiry and OCSP status in separate sensu checks
    for (TransactionConfigEntityData transaction : transactionDataSource.getAllData()) {
        certs.add(createCertificateHealthCheckDto(transaction.getEntityId(), transaction.getEncryptionCertificate(), configuration.getCertificateWarningPeriod()));
        addCertificateHealthCheckDtos(certs, transaction.getEntityId(), transaction.getSignatureVerificationCertificates());
    }
    for (MatchingServiceConfigEntityData ms : matchingServiceDataSource.getAllData()) {
        certs.add(createCertificateHealthCheckDto(ms.getEntityId(), ms.getEncryptionCertificate(), configuration.getCertificateWarningPeriod()));
        addCertificateHealthCheckDtos(certs, ms.getEntityId(), ms.getSignatureVerificationCertificates());
    }
    return certs;
}
Also used : MatchingServiceConfigEntityData(uk.gov.ida.hub.config.domain.MatchingServiceConfigEntityData) CertificateHealthCheckDto(uk.gov.ida.hub.config.dto.CertificateHealthCheckDto) CertificateHealthCheckDto.createCertificateHealthCheckDto(uk.gov.ida.hub.config.dto.CertificateHealthCheckDto.createCertificateHealthCheckDto) TransactionConfigEntityData(uk.gov.ida.hub.config.domain.TransactionConfigEntityData) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 MatchingServiceConfigEntityData (uk.gov.ida.hub.config.domain.MatchingServiceConfigEntityData)1 TransactionConfigEntityData (uk.gov.ida.hub.config.domain.TransactionConfigEntityData)1 CertificateHealthCheckDto (uk.gov.ida.hub.config.dto.CertificateHealthCheckDto)1 CertificateHealthCheckDto.createCertificateHealthCheckDto (uk.gov.ida.hub.config.dto.CertificateHealthCheckDto.createCertificateHealthCheckDto)1