Search in sources :

Example 6 with AthenzConfig

use of com.yahoo.athenz.common.config.AthenzConfig in project athenz by yahoo.

the class PolicyUpdaterConfiguration method readAthenzConfiguration.

private AthenzConfig readAthenzConfiguration(String pathToFile) throws IOException {
    LOG.info("Reading configuration file: " + pathToFile);
    AthenzConfig conf = null;
    try {
        Path path = Paths.get(pathToFile);
        conf = JSON.fromBytes(Files.readAllBytes(path), AthenzConfig.class);
    } catch (Exception e) {
    }
    return conf;
}
Also used : Path(java.nio.file.Path) AthenzConfig(com.yahoo.athenz.common.config.AthenzConfig) IOException(java.io.IOException)

Aggregations

AthenzConfig (com.yahoo.athenz.common.config.AthenzConfig)6 Path (java.nio.file.Path)5 IOException (java.io.IOException)3 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 CryptoException (com.yahoo.athenz.auth.util.CryptoException)1 PublicKeyEntry (com.yahoo.athenz.zms.PublicKeyEntry)1 Struct (com.yahoo.rdl.Struct)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 PublicKey (java.security.PublicKey)1 CertificateParsingException (java.security.cert.CertificateParsingException)1 SSLPeerUnverifiedException (javax.net.ssl.SSLPeerUnverifiedException)1 DERIA5String (org.bouncycastle.asn1.DERIA5String)1 OperatorCreationException (org.bouncycastle.operator.OperatorCreationException)1