summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2022-09-29 11:30:35 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2022-09-29 11:30:35 +0200
commitdc1fe2964619e827517237a1ed3db960b680459d (patch)
tree5ebd87e2a1ec990d6ccd836f1a04998859287634 /node-admin
parent8b463cd632fa4dac1d5809b950d96c51a1101275 (diff)
Remove pem-trust-store flag
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
index 70b9cc9cc16..b903712254b 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
@@ -2,7 +2,6 @@
package com.yahoo.vespa.hosted.node.admin.maintenance.identity;
import com.yahoo.security.KeyAlgorithm;
-import com.yahoo.security.KeyStoreType;
import com.yahoo.security.KeyUtils;
import com.yahoo.security.Pkcs10Csr;
import com.yahoo.security.SslContextBuilder;
@@ -63,8 +62,7 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
private static final String CONTAINER_SIA_DIRECTORY = "/var/lib/sia";
private final URI ztsEndpoint;
- private final Path ztsTrustStoreJksPath;
- private final Path ztsTrustStorePemPath;
+ private final Path ztsTrustStorePath;
private final AthenzIdentity configserverIdentity;
private final Clock clock;
private final ServiceIdentityProvider hostIdentityProvider;
@@ -76,16 +74,14 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
private final Map<ContainerName, Instant> lastRefreshAttempt = new ConcurrentHashMap<>();
public AthenzCredentialsMaintainer(URI ztsEndpoint,
- Path ztsTrustStoreJksPath,
- Path ztsTrustStorePemPath,
+ Path ztsTrustStorePath,
ConfigServerInfo configServerInfo,
String certificateDnsSuffix,
ServiceIdentityProvider hostIdentityProvider,
boolean useInternalZts,
Clock clock) {
this.ztsEndpoint = ztsEndpoint;
- this.ztsTrustStoreJksPath = ztsTrustStoreJksPath;
- this.ztsTrustStorePemPath = ztsTrustStorePemPath;
+ this.ztsTrustStorePath = ztsTrustStorePath;
this.configserverIdentity = configServerInfo.getConfigServerIdentity();
this.csrGenerator = new CsrGenerator(certificateDnsSuffix, configserverIdentity.getFullName());
this.hostIdentityProvider = hostIdentityProvider;
@@ -211,13 +207,9 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
Pkcs10Csr csr = csrGenerator.generateInstanceCsr(
context.identity(), identityDocument.providerUniqueId(), identityDocument.ipAddresses(), keyPair);
- var sslContextBuilder = new SslContextBuilder().withKeyStore(privateKeyFile, certificateFile);
- if (ztsTrustStorePemPath != null) {
- sslContextBuilder.withTrustStore(ztsTrustStorePemPath);
- } else {
- sslContextBuilder.withTrustStore(ztsTrustStoreJksPath, KeyStoreType.JKS);
- }
- SSLContext containerIdentitySslContext = sslContextBuilder.build();
+ SSLContext containerIdentitySslContext = new SslContextBuilder().withKeyStore(privateKeyFile, certificateFile)
+ .withTrustStore(ztsTrustStorePath)
+ .build();
try {
// Set up a hostname verified for zts if this is configured to use the config server (internal zts) apis