summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Tokle <mortent@oath.com>2017-10-31 10:01:43 +0100
committerMorten Tokle <mortent@oath.com>2017-10-31 10:01:43 +0100
commit5c2383c89f6a9473bd77a985254a1a1be1258ba7 (patch)
treedf5b1925501745289af5a208866058ff23f27d77
parentcfede8e29baba06d2bb8fbf456df826e1a2d06db (diff)
Send domain as part of providerservice
-rw-r--r--athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/impl/IdentityDocumentGenerator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/impl/IdentityDocumentGenerator.java b/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/impl/IdentityDocumentGenerator.java
index 644fc929884..efb2179ff6b 100644
--- a/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/impl/IdentityDocumentGenerator.java
+++ b/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/impl/IdentityDocumentGenerator.java
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.athenz.instanceproviderservice.impl;
-import com.yahoo.athenz.auth.util.Crypto;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.hosted.athenz.instanceproviderservice.config.AthenzProviderServiceConfig;
import com.yahoo.vespa.hosted.athenz.instanceproviderservice.impl.model.IdentityDocument;
@@ -27,6 +26,7 @@ public class IdentityDocumentGenerator {
private final String dnsSuffix;
private final String providerService;
private final String ztsUrl;
+ private final String providerDomain;
public IdentityDocumentGenerator(AthenzProviderServiceConfig config, NodeRepository nodeRepository, Zone zone, KeyProvider keyProvider) {
this.nodeRepository = nodeRepository;
@@ -35,6 +35,7 @@ public class IdentityDocumentGenerator {
this.dnsSuffix = config.certDnsSuffix();
this.providerService = config.serviceName();
this.ztsUrl = config.ztsUrl();
+ this.providerDomain = config.domain();
}
public String generateSignedIdentityDocument(String hostname) {
@@ -59,7 +60,7 @@ public class IdentityDocumentGenerator {
SignedIdentityDocument.DEFAULT_KEY_VERSION,
identityDocument.providerUniqueId.asString(),
dnsSuffix,
- providerService,
+ providerDomain + "." + providerService,
ztsUrl,
SignedIdentityDocument.DEFAILT_DOCUMENT_VERSION
);