diff options
author | Morten Tokle <mortent@yahooinc.com> | 2023-02-23 11:46:38 +0100 |
---|---|---|
committer | Morten Tokle <mortent@yahooinc.com> | 2023-02-27 14:23:11 +0100 |
commit | 5928b6455a12dcf06b3282aef6cc81ed0896a2a8 (patch) | |
tree | 6e09e511aa3e880d6ccac808d8d61a930816fbfd /vespa-athenz/src/test | |
parent | cb0248d4c3c958cff49530e42b8ffe5abab706a0 (diff) |
Set ztsUrl/sisUrl in identity document
Diffstat (limited to 'vespa-athenz/src/test')
2 files changed, 5 insertions, 3 deletions
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java index f8c119190a6..2a68f6fd231 100644 --- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java +++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java @@ -30,6 +30,7 @@ class EntityBindingsMapperTest { "ip-addresses": [], "identity-type": "node", "cluster-type": "admin", + "zts-url": "https://zts.url/", "unknown-string": "string-value", "unknown-object": { "member-in-unknown-object": 123 } } diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java index 0b8ff4277f1..36c640f3839 100644 --- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java +++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java @@ -36,6 +36,7 @@ public class IdentityDocumentSignerTest { private static final Instant createdAt = Instant.EPOCH; private static final HashSet<String> ipAddresses = new HashSet<>(Arrays.asList("1.2.3.4", "::1")); private static final ClusterType clusterType = ClusterType.CONTAINER; + private static final String ztsUrl = "https://foo"; @Test void generates_and_validates_signature() { @@ -46,7 +47,7 @@ public class IdentityDocumentSignerTest { SignedIdentityDocument signedIdentityDocument = new SignedIdentityDocument( signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname, - instanceHostname, createdAt, ipAddresses, identityType, clusterType); + instanceHostname, createdAt, ipAddresses, identityType, clusterType, ztsUrl); assertTrue(signer.hasValidSignature(signedIdentityDocument, keyPair.getPublic())); } @@ -60,10 +61,10 @@ public class IdentityDocumentSignerTest { var docWithoutClusterType = new SignedIdentityDocument( signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname, - instanceHostname, createdAt, ipAddresses, identityType, null); + instanceHostname, createdAt, ipAddresses, identityType, null, ztsUrl); var docWithClusterType = new SignedIdentityDocument( signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname, - instanceHostname, createdAt, ipAddresses, identityType, clusterType); + instanceHostname, createdAt, ipAddresses, identityType, clusterType, ztsUrl); assertTrue(signer.hasValidSignature(docWithoutClusterType, keyPair.getPublic())); assertEquals(docWithClusterType.signature(), docWithoutClusterType.signature()); |