Skip to content

Commit

Permalink
Merge pull request #33307 from vespa-engine/revert-33303-evgiz/privat…
Browse files Browse the repository at this point in the history
…e-endpoint-exclusive-auth-provisioning

Revert "Exclusive zone endpoint auth in containermodelbuilder"
  • Loading branch information
evgiz authored Feb 12, 2025
2 parents 02c9b5d + 40913e6 commit 112de44
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1033,14 +1033,15 @@ private ZoneEndpoint zoneEndpoint(ConfigModelContext context, ClusterSpec.Id clu
ZoneId zone = ZoneId.from(context.properties().zone().environment(),
context.properties().zone().region());

var useTokenAuthentication = context.properties()
var supportsTokenAuthentication = context.properties()
.endpoints()
.stream()
.anyMatch(endpoint ->
endpoint.scope() == ApplicationClusterEndpoint.Scope.zone &&
endpoint.authMethod() == ApplicationClusterEndpoint.AuthMethod.token &&
endpoint.clusterId().equals(cluster.value()));
var authMethods = useTokenAuthentication ? List.of(AuthMethod.token) : List.of(AuthMethod.mtls);
var authMethods = supportsTokenAuthentication ?
List.of(AuthMethod.mtls, AuthMethod.token) :
List.of(AuthMethod.mtls);

return context
.getApplicationPackage()
Expand Down

0 comments on commit 112de44

Please sign in to comment.