From 1b96b02030e9daf2634d87be0dacb3e54828922b Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:39:55 -0500 Subject: [PATCH] adds the audience mapping to the router (#2661) * adds the audience mapping to the router * whitespace consistency * update test to verify audience * update go.mod/sum --- controller/internal/routes/external_jwt_signer_api_model.go | 1 + go.mod | 2 +- go.sum | 4 ++++ tests/external_jwt_signer_test.go | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/controller/internal/routes/external_jwt_signer_api_model.go b/controller/internal/routes/external_jwt_signer_api_model.go index 580325e31..f12641cfe 100644 --- a/controller/internal/routes/external_jwt_signer_api_model.go +++ b/controller/internal/routes/external_jwt_signer_api_model.go @@ -51,6 +51,7 @@ func MapClientExternalJwtSignerToRestModel(externalJwtSigner *model.ExternalJwtS Name: &externalJwtSigner.Name, ClientID: externalJwtSigner.ClientId, Scopes: externalJwtSigner.Scopes, + Audience: externalJwtSigner.Audience, } return ret } diff --git a/go.mod b/go.mod index 5802ffe36..a1098ce3a 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/openziti/agent v1.0.23 github.com/openziti/channel/v3 v3.0.26 github.com/openziti/cobra-to-md v1.0.1 - github.com/openziti/edge-api v0.26.36 + github.com/openziti/edge-api v0.26.38 github.com/openziti/foundation/v2 v2.0.56 github.com/openziti/identity v1.0.94 github.com/openziti/jwks v1.0.6 diff --git a/go.sum b/go.sum index b45961761..3e11361b3 100644 --- a/go.sum +++ b/go.sum @@ -597,6 +597,10 @@ github.com/openziti/dilithium v0.3.5 h1:+envGNzxc3OyVPiuvtxivQmCsOjdZjtOMLpQBeMz github.com/openziti/dilithium v0.3.5/go.mod h1:XONq1iK6te/WwNzkgZHfIDHordMPqb0hMwJ8bs9EfSk= github.com/openziti/edge-api v0.26.36 h1:zy2DjmIz/B+WxPpIzhFOAxi/LhM/yeKa8s1Vz2h8cQk= github.com/openziti/edge-api v0.26.36/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng= +github.com/openziti/edge-api v0.26.37 h1:MQGDQusrya6U5IEW/t6x6IRzBqzBVFF00YNcuPMNtnY= +github.com/openziti/edge-api v0.26.37/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng= +github.com/openziti/edge-api v0.26.38 h1:3xDWC5SFn3qUVR428TIBpRc2lrjVV7Gz0Rx4pQx0JSg= +github.com/openziti/edge-api v0.26.38/go.mod h1:sYHVpm26Jr1u7VooNJzTb2b2nGSlmCHMnbGC8XfWSng= github.com/openziti/foundation/v2 v2.0.56 h1:YXqBmkrN0fYr3TqIlWZSZGluE2QpJxlA29Z6okZyQ5I= github.com/openziti/foundation/v2 v2.0.56/go.mod h1:f12R1pwEod348qONZr6esZgackX1ScLGDcEyPF2G5/w= github.com/openziti/identity v1.0.94 h1:nF4etu/5LmOlbT24lpSKq9p+90A9jeyLr5U23LemgD4= diff --git a/tests/external_jwt_signer_test.go b/tests/external_jwt_signer_test.go index 243ecc165..2eebbd71b 100644 --- a/tests/external_jwt_signer_test.go +++ b/tests/external_jwt_signer_test.go @@ -107,6 +107,7 @@ func Test_ExternalJWTSigner(t *testing.T) { ctx.Req.Equal(*jwtSigner.Name, *jwtSignerListEnv.Data[0].Name) ctx.Req.Equal(*jwtSigner.ExternalAuthURL, *jwtSignerListEnv.Data[0].ExternalAuthURL) ctx.Req.Equal(*jwtSigner.ClientID, *jwtSignerListEnv.Data[0].ClientID) + ctx.Req.Equal(*jwtSigner.Audience, *jwtSignerListEnv.Data[0].Audience) ctx.Req.Equal(jwtSigner.Scopes, jwtSignerListEnv.Data[0].Scopes) }) })