diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2021-04-13 16:32:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 16:32:14 +0200 |
commit | e04fd8a5b71de587e4fd1d5615733c5c1cb1a9d5 (patch) | |
tree | a002e8221b7d9dbec13ec3b5b8a2c6d73acfb9fd /vespa-athenz | |
parent | a5f88e456dd105f1c47d2c42329a1c7f97cdde72 (diff) |
Revert "Revert "Revert "Jonmv/reapply upgrade athenz"""
Diffstat (limited to 'vespa-athenz')
-rw-r--r-- | vespa-athenz/pom.xml | 24 | ||||
-rw-r--r-- | vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java | 12 |
2 files changed, 1 insertions, 35 deletions
diff --git a/vespa-athenz/pom.xml b/vespa-athenz/pom.xml index 653eb58d76d..7d2ad924ae3 100644 --- a/vespa-athenz/pom.xml +++ b/vespa-athenz/pom.xml @@ -65,14 +65,6 @@ </exclusion> <!--Exclude all Jackson bundles provided by JDisc --> <exclusion> - <groupId>jakarta.activation</groupId> - <artifactId>jakarta.activation-api</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.xml.bind</groupId> - <artifactId>jakarta.xml.bind-api</artifactId> - </exclusion> - <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> </exclusion> @@ -86,22 +78,6 @@ </exclusion> </exclusions> </dependency> - <dependency> <!-- needed by auth-core --> - <groupId>io.jsonwebtoken</groupId> - <artifactId>jjwt-impl</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <!-- needed by auth-core --> - <groupId>io.jsonwebtoken</groupId> - <artifactId>jjwt-jackson</artifactId> - <scope>compile</scope> - <exclusions> - <exclusion> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>com.yahoo.athenz</groupId> <artifactId>athenz-zpe-java-client</artifactId> diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java index b5473929184..30ff63fb108 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/aws/AwsCredentials.java @@ -25,18 +25,12 @@ public class AwsCredentials { private final AthenzDomain athenzDomain; private final AwsRole awsRole; private final ZtsClient ztsClient; - private final String externalId; private volatile AwsTemporaryCredentials credentials; public AwsCredentials(ZtsClient ztsClient, AthenzDomain athenzDomain, AwsRole awsRole) { - this(ztsClient, athenzDomain, awsRole, null); - } - - public AwsCredentials(ZtsClient ztsClient, AthenzDomain athenzDomain, AwsRole awsRole, String externalId) { this.ztsClient = ztsClient; this.athenzDomain = athenzDomain; this.awsRole = awsRole; - this.externalId = externalId; this.credentials = get(); } @@ -48,16 +42,12 @@ public class AwsCredentials { this(new DefaultZtsClient.Builder(ztsUrl).withSslContext(sslContext).build(), athenzDomain, awsRole); } - public AwsCredentials(URI ztsUrl, SSLContext sslContext, AthenzDomain athenzDomain, AwsRole awsRole, String externalId) { - this(new DefaultZtsClient.Builder(ztsUrl).withSslContext(sslContext).build(), athenzDomain, awsRole, externalId); - } - /** * Requests temporary credentials from ZTS or return cached credentials */ public AwsTemporaryCredentials get() { if(shouldRefresh(credentials)) { - this.credentials = ztsClient.getAwsTemporaryCredentials(athenzDomain, awsRole, externalId); + this.credentials = ztsClient.getAwsTemporaryCredentials(athenzDomain, awsRole); } return credentials; } |