You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,29 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
6
6
---
7
7
8
+
## [0.6.0] — 2026-06-03
9
+
10
+
### Added
11
+
12
+
- OAuth provider support with signed state cookies, provider discovery endpoint, redirect start/callback routes, and adapter hooks for mapping external identities into `admin.Actor`
13
+
- API key authentication for admin API requests via `Authorization: Bearer <key>` or `X-API-Key`
14
+
- Built-in PostgreSQL API key storage with hashed secrets, prefix lookup, expiration, revocation, last-used tracking, and audit events
15
+
- API key management endpoints at `GET/POST /admin/api/auth/api-keys` and `POST /admin/api/auth/api-keys/{id}/revoke`
16
+
- Generated frontend login support for configured OAuth providers and a live API settings screen for issuing and revoking keys
17
+
18
+
### Changed
19
+
20
+
-`server.Config` now accepts optional `APIKeys`, `OAuthProviders`, `ResolveOAuthActor`, `SigningSecret`, `OAuthSuccessURL`, and `OAuthFailureURL`
21
+
- Protected admin routes now accept either a session cookie or a valid API key
22
+
-`gomyadmin version` now reports `0.6.0`
23
+
8
24
## [0.5.0] — 2026-06-02
9
25
10
26
### Added
11
27
12
28
- Integration test suite in `tests/integration/` (`//go:build integration`) for `pkg/server` (full CRUD login→logout), `pkg/migrate` (idempotency, checksum validation), and CLI binary (version, doctor, init, introspect)
13
29
- CI integration test step running against the existing PostgreSQL service
14
-
- CI coverage threshold: PRs fail if total coverage drops below 90%
30
+
- CI coverage gate for non-template Go packages; PRs fail if scoped total coverage drops below the configured threshold
Copy file name to clipboardExpand all lines: docs/auth.md
+56-1Lines changed: 56 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,61 @@ Production requirements:
24
24
25
25
Existing applications can pass any implementation of `auth.SessionStore` through `server.Config.SessionStore`. This is the integration point for Redis, Memcached, SQL-backed sessions, or an existing internal session service.
26
26
27
+
## API Keys
28
+
29
+
GoMyAdmin v0.6 adds optional API key authentication for machine-to-machine use cases. A valid key can be sent in either:
30
+
31
+
-`Authorization: Bearer <key>`
32
+
-`X-API-Key: <key>`
33
+
34
+
When the built-in PostgreSQL server adapter is active, `server.New` automatically provisions an API key store and exposes:
35
+
36
+
-`GET /admin/api/auth/api-keys`
37
+
-`POST /admin/api/auth/api-keys`
38
+
-`POST /admin/api/auth/api-keys/{id}/revoke`
39
+
40
+
Secrets are shown only once at creation time. Stored values are hashed, and each key tracks `expires_at`, `revoked_at`, and `last_used_at`.
41
+
42
+
## OAuth
43
+
44
+
OAuth remains optional and adapter-driven. Configure providers in `server.Config.OAuthProviders` and map external identities into local actors with `server.Config.ResolveOAuthActor`.
45
+
46
+
The built-in flow exposes:
47
+
48
+
-`GET /admin/api/auth/providers`
49
+
-`GET /admin/api/auth/oauth/{provider}/start`
50
+
-`GET /admin/api/auth/oauth/{provider}/callback`
51
+
52
+
GoMyAdmin signs the OAuth state cookie with `server.Config.SigningSecret` (defaults to `GOMYADMIN_SESSION_SECRET`).
See [docs/oauth-google.md](oauth-google.md) for a concrete Google setup flow.
81
+
27
82
## CSRF
28
83
29
84
Login issues a CSRF token cookie. Mutating admin requests should send the token back in `X-CSRF-Token`. The generated API already allows this header in CORS.
@@ -64,4 +119,4 @@ The generated login route is protected by `auth.NewRateLimiter`. Keep this limit
64
119
65
120
## Roadmap
66
121
67
-
OAuth providers, magic links, and TOTP modules are planned as optional auth adapters rather than mandatory framework features.
122
+
Magic links and TOTP remain planned as optional auth adapters rather than mandatory framework features.
0 commit comments