aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java
diff options
context:
space:
mode:
authorMorten Tokle <mortent@oath.com>2017-11-22 13:55:21 +0100
committerMorten Tokle <mortent@oath.com>2017-11-22 13:55:21 +0100
commit8a3a438afaf538766e5388bb48802db05fc055ce (patch)
treef868c2a1734fad1c0a5e05611dda6fa095634e87 /config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java
parent4fa8521f1d23a64c0c0bc1b8fb11c1be7a7c3762 (diff)
Rename Identity -> IdentityProvider
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java
new file mode 100644
index 00000000000..0368f7eaf3e
--- /dev/null
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java
@@ -0,0 +1,36 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.model.container;
+
+import com.yahoo.config.provision.AthenzDomain;
+import com.yahoo.config.provision.AthenzService;
+import com.yahoo.config.provision.HostName;
+import com.yahoo.container.core.identity.IdentityConfig;
+import com.yahoo.container.jdisc.athenz.impl.AthenzIdentityProviderImpl;
+import com.yahoo.vespa.model.container.component.SimpleComponent;
+
+/**
+ * @author mortent
+ */
+public class IdentityProvider extends SimpleComponent implements IdentityConfig.Producer {
+ public static final String CLASS = AthenzIdentityProviderImpl.class.getName();
+
+ private final AthenzDomain domain;
+ private final AthenzService service;
+ private final HostName loadBalancerName;
+
+ public IdentityProvider(AthenzDomain domain, AthenzService service, HostName loadBalancerName) {
+ super(CLASS);
+ this.domain = domain;
+ this.service = service;
+ this.loadBalancerName = loadBalancerName;
+ }
+
+ @Override
+ public void getConfig(IdentityConfig.Builder builder) {
+ builder.domain(domain.value());
+ builder.service(service.value());
+ // Current interpretation of loadbalancer address is: hostname.
+ // Config should be renamed or send the uri
+ builder.loadBalancerAddress(loadBalancerName.value());
+ }
+}