headscale/hscontrol
Ryan Malloy 32ea1c1c84 oidc groups: fix post-merge compile and migration issues
Bugs found by running the real test suite after merging upstream:

- types/types_clone.go, types/types_view.go: extend the regeneration
  guard struct literals to include the new Groups field, and add a
  UserView.Groups() accessor. Generated files normally rebuilt via
  cloner / viewer; touched by hand here pending make generate.
- db/db.go: the migration adding the groups column ran after
  202505141324, which calls ListUsers() through the User struct that
  now includes Groups. Move the column-add to 202505141323 so the
  schema is in place before any migration loads users. Register the
  new ID in the FK-disabled migration list.
- db/db.go: 202507021200 recreates all tables from inline SQL during
  the SQLite schema migration; add groups to both the CREATE TABLE
  users statement and the INSERT INTO users ... SELECT FROM users_old
  so the column survives the recreation. Also fix a copy-paste bug
  in the Rollback closure that referenced tx instead of db.
- db/schema.sql: add the groups column to the canonical schema so
  squibble.Validate accepts databases produced by the new migration
  chain. Verified against all 7 historical sqlite dumps in
  hscontrol/db/testdata/sqlite.
- types/users_test.go: the casby-oidc-claim case now exercises group
  storage; update the want to include the JSON-encoded groups column.
- integration/oidc_groups_test.go: replace the aspirational draft
  (which referenced assertNoErr, scenario.usernames, hsic.WithTLS and
  other symbols that do not exist) with a focused test that follows
  the auth_oidc_test.go pattern. Verifies the groups column directly
  via sqlite3 inside the headscale container since the gRPC User
  message does not expose Groups.
2026-05-21 21:14:08 -06:00
..
assets assets: fix logo alignment and error icon centering 2026-04-13 17:23:47 +01:00
capver all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
db oidc groups: fix post-merge compile and migration issues 2026-05-21 21:14:08 -06:00
derp all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
dns all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
mapper all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
policy all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
servertest all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
state all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
templates all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
types oidc groups: fix post-merge compile and migration issues 2026-05-21 21:14:08 -06:00
util all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
app.go all: annotate gosec false positives with rationale 2026-05-19 09:55:22 +02:00
app_test.go app: add security headers middleware 2026-04-17 16:31:49 +01:00
auth.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
auth_tags_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
auth_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
debug.go all: mechanical lint fixes 2026-05-19 09:55:22 +02:00
grpcv1.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
grpcv1_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
handlers.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
handlers_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
metrics.go metrics, policy/v2: drop unused scaffolding + nil-error returns 2026-05-19 09:55:22 +02:00
noise.go noise: pin outer RemoteAddr onto tunnel requests 2026-05-20 11:30:41 +02:00
noise_test.go noise: pin outer RemoteAddr onto tunnel requests 2026-05-20 11:30:41 +02:00
oidc.go all: annotate gosec false positives with rationale 2026-05-19 09:55:22 +02:00
oidc_confirm_test.go all: annotate gosec false positives with rationale 2026-05-19 09:55:22 +02:00
oidc_template_test.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
oidc_test.go oidc: make email verification configurable 2025-12-18 11:42:32 +00:00
platform_config.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
poll.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
poll_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
realip.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
realip_test.go hscontrol: gate proxy header trust on trusted_proxies 2026-05-18 17:17:55 +02:00
tailsql.go all: annotate gosec false positives with rationale 2026-05-19 09:55:22 +02:00
templates_consistency_test.go Update links to Tailscale documentation 2026-04-18 09:33:41 +02:00