Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read truststore from vespa.ca.cert.pem #32410

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public final class AthenzIdentityProviderImpl extends AbstractComponent implemen
// TODO CMS expects 10min or less token ttl. Use 10min default until we have configurable expiry
private final static Duration ROLE_TOKEN_EXPIRY = Duration.ofMinutes(10);

// TODO Make path to trust store paths config
private static final Path CLIENT_TRUST_STORE = Paths.get("/opt/yahoo/share/ssl/certs/yahoo_certificate_bundle.pem");
private static final Path CLIENT_TRUST_STORE = SiaUtils.getVespaCaCertificatesFile();

public static final String CERTIFICATE_EXPIRY_METRIC_NAME = ContainerMetrics.ATHENZ_TENANT_CERT_EXPIRY_SECONDS.baseName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ public static Path getCaCertificatesFile(Path root) {
return root.resolve("certs").resolve("ca.cert.pem");
}

public static Path getVespaCaCertificatesFile() {
return getVespaCaCertificatesFile(DEFAULT_SIA_DIRECTORY);
}

public static Path getVespaCaCertificatesFile(Path root) {
return root.resolve("certs").resolve("vespa.ca.cert.pem");
}

public static Optional<PrivateKey> readPrivateKeyFile(AthenzIdentity service) {
return readPrivateKeyFile(DEFAULT_SIA_DIRECTORY, service);
}
Expand Down