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
feat(oauth2): add authorization server metadata endpoint and PKCE support
- Add /.well-known/oauth-authorization-server metadata endpoint (RFC 8414)- Implement PKCE support with S256 method for enhanced security- Add resource parameter support (RFC 8707) for token binding- Add OAuth2-compliant error responses with proper error codes- Fix authorization UI to use POST-based consent instead of GET redirects- Add comprehensive OAuth2 test scripts and interactive test server- Update CLAUDE.md with OAuth2 development guidelinesDatabase changes:- Add migration 000341: code_challenge, resource_uri, audience fields- Update audit table for new OAuth2 fieldsOAuth2 provider remains development-only (requires --dev flag).Change-Id: Ifbd0d9a543d545f9f56ecaa77ff2238542ff954aSigned-off-by: Thomas Kosiewski <tk@coder.com>
- MUST DO! Any changes to database - adding queries, modifying queries should be done in the`coderd/database/queries/*.sql` files
95
+
- MUST DO! Queries are grouped in files relating to context - e.g.`prebuilds.sql`,`users.sql`,`oauth2.sql`
96
+
- After making changes to any`coderd/database/queries/*.sql` files you must run`make gen` to generate respective ORM changes
97
+
98
+
3.**Handle nullable fields**:
99
+
- Use`sql.NullString`,`sql.NullBool`, etc. for optional database fields
100
+
- Set`.Valid = true` when providing values
101
+
- Example:
102
+
103
+
```go
104
+
CodeChallenge: sql.NullString{
105
+
String: params.codeChallenge,
106
+
Valid: params.codeChallenge !="",
107
+
}
108
+
```
67
109
68
-
- MUST DO! Any changes to database - adding queries, modifying queries should be done in the`coderd\database\queries\*.sql` files. Use`make gen` to generate necessary changes after.
69
-
- MUST DO! Queries are grouped in files relating to context - e.g.`prebuilds.sql`,`users.sql`,`provisionerjobs.sql`.
70
-
- After making changes to any`coderd\database\queries\*.sql` files you must run`make gen` to generate respective ORM changes.
110
+
4. **Audit table updates**:
111
+
-If adding fields to auditable types, update`enterprise/audit/table.go`
112
+
-Add each new field with appropriateaction (ActionTrack,ActionIgnore,ActionSecret)
113
+
-Run`make gen` to verify no audit errors
114
+
115
+
###DatabaseGenerationProcess
116
+
117
+
1.ModifySQL files in`coderd/database/queries/`
118
+
2.Run`make gen`
119
+
3.If errors about audit table, update`enterprise/audit/table.go`