registry/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Radoslav Dimitrov dfaa8f3b82
auth/oidc: test slice-typed extra claims comparison (#1245)
## Summary
Follow-up to #1238 (closes #988). Adds direct unit-test coverage for the
`claimMatches` helper, which was the actual change in #1238.

`claimMatches` and `toAnySlice` are unexported, so the tests live in
`oidc_internal_test.go` (`package auth`) — same pattern as
`http_internal_test.go`. Cases covered:

- scalar/scalar match and mismatch
- scalar actual against array expected (both directions of overlap)
- array actual against scalar expected
- **array/array** — pre-#1238 this combination panicked with `comparing
uncomparable type []interface {}`
- `[]string` typed slice (exercises the typed-slice branch of
`toAnySlice`, which `[]any` skips)
- non-string scalars (int, bool)
- empty actual array

Test values use single letters (`x`, `y`, `p`, `q`) rather than role
labels — only the relationships matter, and short tokens keep `goconst`
quiet.

## Test plan
- [x] `go test ./internal/api/handlers/v0/auth/...` — all 13 subtests
pass
- [x] `golangci-lint run ./internal/api/handlers/v0/auth/...` — no new
issues vs main
2026-05-04 06:52:12 -04:00
..
api auth/oidc: test slice-typed extra claims comparison (#1245) 2026-05-04 06:52:12 -04:00
auth security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00
config auth: bind GitHub OIDC token exchange to a per-deployment audience (#1229) 2026-04-29 20:27:26 -04:00
database security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00
importer Enhanced server.json validation (phase 1) (#636) 2026-01-16 00:49:39 +02:00
service fix(list): use row-constructor cursor + restore per-phase publish timings + enable pg_stat_statements (#1215) 2026-04-27 15:35:59 -04:00
telemetry build(deps): bump go.opentelemetry.io/contrib/instrumentation/runtime from 0.64.0 to 0.65.0 (#940) 2026-02-09 11:11:06 +02:00
validators security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00