diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2023-07-03 09:47:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 09:47:03 +0200 |
commit | 6449baee57367e9ca6537fccf97ae9c9a9264a4b (patch) | |
tree | a78fd6d8ff2c4dfbd0f798e1ce028576b7622a4b | |
parent | 78f20e140db88e1b3ad26ffc3419e408716f4e57 (diff) | |
parent | 1c2f0abd376d8b871b4a60ce9effa5242f09cd54 (diff) |
Merge pull request #27600 from vespa-engine/hakonhall/no-need-for-config-in-identitydocumentgenerator
No need for config in IdentityDocumentGenerator
2 files changed, 6 insertions, 9 deletions
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java index c7517ef8adb..00d82177367 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java @@ -2,20 +2,17 @@ package com.yahoo.vespa.athenz.identityprovider.api; import com.yahoo.vespa.athenz.api.AthenzIdentity; -import com.yahoo.vespa.athenz.api.AthenzService; import java.time.Instant; import java.util.HashMap; -import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; /** * Represents an unsigned identity document * @author mortent */ -public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzService providerService, String configServerHostname, +public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, Set<String> ipAddresses, IdentityType identityType, ClusterType clusterType, String ztsUrl, AthenzIdentity serviceIdentity, Map<String, Object> unknownAttributes) { @@ -31,7 +28,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer unknownAttributes = Map.copyOf(nonNull); } - public IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzService providerService, String configServerHostname, + public IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, Set<String> ipAddresses, IdentityType identityType, ClusterType clusterType, String ztsUrl, AthenzIdentity serviceIdentity) { @@ -39,7 +36,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer } - public IdentityDocument withServiceIdentity(AthenzService athenzService) { + public IdentityDocument withServiceIdentity(AthenzIdentity serviceIdentity) { return new IdentityDocument( this.providerUniqueId, this.providerService, @@ -50,7 +47,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer this.identityType, this.clusterType, this.ztsUrl, - athenzService, + serviceIdentity, this.unknownAttributes); } } diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java index 11b30585933..4a9e1814c82 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java @@ -51,7 +51,7 @@ public class IdentityDocumentSigner { // Cluster type is ignored due to old Vespa versions not forwarding unknown fields in signed identity document private String generateSignature(VespaUniqueInstanceId providerUniqueId, - AthenzService providerService, + AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, @@ -109,7 +109,7 @@ public class IdentityDocumentSigner { private static void writeToSigner(Signature signer, VespaUniqueInstanceId providerUniqueId, - AthenzService providerService, + AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, |