@@ -0,0 +1,1590 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.%0Apackage com.yahoo.vespa.hosted.controller.athenz.filter;%0A%0Aimport com.google.inject.Inject;%0Aimport com.yahoo.jdisc.http.ssl.SslTrustStoreConfigurator;%0Aimport com.yahoo.jdisc.http.ssl.SslTrustStoreContext;%0Aimport com.yahoo.vespa.hosted.controller.athenz.config.AthenzConfig;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.security.KeyStore;%0Aimport java.security.KeyStoreException;%0Aimport java.security.NoSuchAlgorithmException;%0Aimport java.security.cert.CertificateException;%0A%0A/**%0A * Load trust store with Athenz CA certificates%0A *%0A * @author bjorncs%0A */%0Apublic class AthenzTrustStoreConfigurator implements SslTrustStoreConfigurator %7B%0A%0A    private final KeyStore trustStore;%0A%0A    @Inject%0A    public AthenzTrustStoreConfigurator(AthenzConfig config) %7B%0A        this.trustStore = createTrustStore(new File(config.athenzCaTrustStore()));%0A    %7D%0A%0A    private static KeyStore createTrustStore(File trustStoreFile) %7B%0A        try (FileInputStream in = new FileInputStream(trustStoreFile)) %7B%0A            KeyStore trustStore = KeyStore.getInstance(%22JKS%22);%0A            trustStore.load(in, %22changeit%22.toCharArray());%0A            return trustStore;%0A        %7D catch (IOException %7C CertificateException %7C NoSuchAlgorithmException %7C KeyStoreException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void configure(SslTrustStoreContext context) %7B%0A        context.updateTrustStore(trustStore);%0A    %7D%0A%7D%0A

Add trust store configurator with Athenz CA certificates