From d1f0d5046fba813ee3229a7c4d54bce2be7123c1 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 2 Jul 2025 16:19:50 -0600 Subject: chore: fix AUTHZD_HOST value --- .runway/env-production.yml | 2 +- .runway/env-staging.yml | 2 +- pkg/authz/server.go | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.runway/env-production.yml b/.runway/env-production.yml index 75e1802..2b05f63 100644 --- a/.runway/env-production.yml +++ b/.runway/env-production.yml @@ -1,4 +1,4 @@ APP_ENV: "production" -AUTHZD_HOST: "https://authzd.runway.gitlab.net" +AUTHZD_HOST: "authzd.runway.gitlab.net" OAUTH_CLIENT_ID: "75656280b7ca60223b060b57c4eb98a8a324878531efeccafc1d25709dbee5c9" OIDC_ISSUER: "https://gitlab.com" diff --git a/.runway/env-staging.yml b/.runway/env-staging.yml index 3ccc33e..2b2ce8e 100644 --- a/.runway/env-staging.yml +++ b/.runway/env-staging.yml @@ -1,4 +1,4 @@ APP_ENV: "production" -AUTHZD_HOST: "https://authzd.staging.runway.gitlab.net" +AUTHZD_HOST: "authzd.staging.runway.gitlab.net" OAUTH_CLIENT_ID: "786e37c8d2207d200f735379ad52579c452948222f9affc7a45e74bd7074ad3c" OIDC_ISSUER: "https://staging.gitlab.com" diff --git a/pkg/authz/server.go b/pkg/authz/server.go index 4728182..05580b0 100644 --- a/pkg/authz/server.go +++ b/pkg/authz/server.go @@ -29,8 +29,17 @@ func New(ctx context.Context, options ...grpc.ServerOption) *Server { connection := Connection.From(ctx) if x.IsZero(connection) { + pls.LogNow(ctx, log.Fields{"remote-authzd": "not connected"}) + pls.LogNow(ctx, log.Fields{"authzd": map[string]string{ + "target": "unknown", + "state": "invalid", + }}) auth.RegisterAuthorizationServer(server, NewCheckService(nil)) } else { + pls.LogNow(ctx, log.Fields{"authzd": map[string]string{ + "target": connection.CanonicalTarget(), + "state": connection.GetState().String(), + }}) auth.RegisterAuthorizationServer( server, NewCheckService( -- cgit v1.2.3