Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ linters:
- legacy
- std-error-handling
rules:
- linters:
- staticcheck
text: "SA1019:"
paths:
- integration/grpc_test.go
- internal/grpc/oidcmapping.go
- internal/grpc/oidcmapping_test.go
- internal/grpc/session.go
- linters:
- dupl
- funlen
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ require (
github.com/jellydator/ttlcache/v3 v3.4.0
github.com/moby/moby/api v1.54.2
github.com/oapi-codegen/runtime v1.4.1
github.com/openkcm/api-sdk v0.18.1
github.com/openkcm/common-sdk v1.17.1-0.20260625093719-a9d985dfad28
github.com/openkcm/api-sdk v0.19.1
github.com/openkcm/common-sdk v1.18.0
github.com/pressly/goose/v3 v3.27.1
github.com/samber/oops v1.22.0
github.com/spf13/cobra v1.10.2
Expand All @@ -42,6 +42,7 @@ require (
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect
cel.dev/expr v0.25.1 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 h1:s6hzCXtND/ICdGPTMGk7C+/BFlr2Jg5GyH0NKf4XGXg=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
Expand Down Expand Up @@ -261,10 +263,10 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/openkcm/api-sdk v0.18.1 h1:Ch8iPTKz/PAgHI1HVHeYHKT8iuKjb5jHHRJoPl10HiM=
github.com/openkcm/api-sdk v0.18.1/go.mod h1:3CQUZVNl/Nu5K71M1arSiTsJhyLloO3pJpqwBL1oE1o=
github.com/openkcm/common-sdk v1.17.1-0.20260625093719-a9d985dfad28 h1:qosb9xr/eT6sbFXbHc9YsQOLUxRPk4EwgBL3qR/ixJM=
github.com/openkcm/common-sdk v1.17.1-0.20260625093719-a9d985dfad28/go.mod h1:o6Z6/01yE8JOwtveQTbfE7JcFh627HHdssvQmkOUOjI=
github.com/openkcm/api-sdk v0.19.1 h1:HJ+bDSNJGVjMusKMPKZFFuNzS45/vS5Gy0cg6lJQbGk=
github.com/openkcm/api-sdk v0.19.1/go.mod h1:20T4EBixi01BsyxD3yNQt6Ceo/Hmm7nnkgeiKt6JaH8=
github.com/openkcm/common-sdk v1.18.0 h1:AzUOmTMUmif73UHV21G0Gf4XYN1rjQRGgYEcaBrTetQ=
github.com/openkcm/common-sdk v1.18.0/go.mod h1:o6Z6/01yE8JOwtveQTbfE7JcFh627HHdssvQmkOUOjI=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
Expand Down
1 change: 1 addition & 0 deletions internal/grpc/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func (s *SessionServer) GetOIDCProvider(ctx context.Context, req *sessionv1.GetO
IssuerUrl: provider.IssuerURL,
JwksUri: provider.JWKSURI,
Audiences: provider.Audiences,
ClientId: provider.ClientID,
},
}, nil
}
Expand Down
1 change: 0 additions & 1 deletion sql/00005_client_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func readClientIDfromConfig() (string, error) {
}

// Read the client_id from the config
//nolint:staticcheck

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked claude about this change:

Is modifying a goose migration file safe?

Yes, in this specific case it is safe. Here's why:

  1. Goose tracks migrations by filename/number, not content hash. Once migration 00005 has run on a database, goose records it in the goose_db_version table by its sequence number. It does not re-run migrations or detect content changes.

  2. This is a Go migration, not a SQL migration. The Go code only executes during goose up when the migration hasn't been applied yet. Databases that have already run this migration will never execute this code again.

  3. The change is purely cosmetic. Fixing the //nolint directive doesn't change the migration's behavior — it only satisfies the linter.

clientID := cfg.SessionManager.ClientAuth.ClientID
if clientID == "" {
return "", errors.New("client_id is not set in the config")
Expand Down
Loading