Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: update dynamic parameters for beta release#18512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stirby merged 57 commits intomainfromdynamic-params-beta
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
57 commits
Select commitHold shift + click to select a range
4ee8b84
beta tag; remove key-value
EdwardAngertJun 23, 2025
c31599d
moved parameters into new file
stirbyJun 27, 2025
fa5ee37
WIP examples needed
stirbyJun 30, 2025
95e171d
adding form types
stirbyJul 1, 2025
24a38ad
feature stage
stirbyJul 1, 2025
0a0c39b
more examples
stirbyJul 1, 2025
cc30cfe
previewing tabs
stirbyJul 1, 2025
b9aff1c
dynamic defaults
stirbyJul 1, 2025
0423ea0
validation
stirbyJul 1, 2025
d0769d8
added secret parameters
stirbyJul 2, 2025
cbec77b
added more examples
stirbyJul 2, 2025
c5e1684
happy with current state
stirbyJul 3, 2025
ce034ac
Merge branch 'main' into dynamic-params-beta
stirbyJul 3, 2025
a3c93af
fmt
stirbyJul 3, 2025
0e08ed0
fixed beta tag
stirbyJul 7, 2025
1379bcc
added screenshot and gif
stirbyJul 7, 2025
2b0d729
chore: add rdp icon (#18736)
matifaliJul 3, 2025
eb66684
feat: display descriptions in multi-select component (#18730)
jaaydenhJul 3, 2025
61ed79f
docs: update release calendar with 2.24 release (#18742)
matifaliJul 3, 2025
c765e1e
fix(site): update vs code dev container button URLs (#18696)
mafredriJul 3, 2025
7ce1a9c
feat(examples/templates): add `docker-devcontainer` template and rena…
mafredriJul 3, 2025
cb197ab
chore: create interface for pkgs to return codersdk errors (#18719)
EmyrkJul 3, 2025
9c616b9
feat: implement OAuth2 dynamic client registration (RFC 7591/7592) (#…
ThomasK33Jul 3, 2025
b499188
docs: add comprehensive development documentation (#18646)
ThomasK33Jul 3, 2025
c578fac
chore: implement tests for dynamic parameter component (#18745)
jaaydenhJul 3, 2025
41b9a9b
fix: remove unique constraint on OAuth2 provider app names (#18669)
ThomasK33Jul 3, 2025
eb75028
feat: implement MCP HTTP server endpoint with authentication (#18670)
ThomasK33Jul 3, 2025
6de25bc
chore: update gofumpt from v0.4.0 to v0.8.0 (#18652)
blink-so[bot]Jul 3, 2025
e474d55
feat: add OAuth2 provider functionality as an experiment (#18692)
ThomasK33Jul 3, 2025
273fde9
feat: add MCP HTTP server experiment and improve experiment middlewar…
ThomasK33Jul 3, 2025
0cf3ec3
refactor: move OAuth2 provider code to dedicated package (#18746)
ThomasK33Jul 3, 2025
3cab673
refactor: organize OAuth2 provider tests into dedicated packages (#18…
ThomasK33Jul 3, 2025
a60b85b
feat: use preview to compute workspace tags from terraform (#18720)
EmyrkJul 3, 2025
fd82c73
fix: add manual confirmation for release calendar update (#18748)
blink-so[bot]Jul 3, 2025
ea5e1d9
feat: establish terminal reconnection foundation (#18693)
BrunoQuaresmaJul 3, 2025
89298dd
docs: align feature stages for July release (#18752)
EdwardAngertJul 4, 2025
e9f3eac
docs: reorganize remote desktop docs (#18716)
matifaliJul 6, 2025
fa6a2e2
docs: add RDP desktop button gif (#18758)
matifaliJul 6, 2025
e6f1181
fix: handle `sql/driver.Valuer` types properly in `json` logs (#18760)
ethanndicksonJul 7, 2025
878f7c4
feat: make readinessProbe and livenessProbe initialDelaySeconds confi…
blink-so[bot]Jul 7, 2025
d51215f
feat: update tasks docs (#18659)
bpmctJul 7, 2025
fd85dae
chore: add suggestions to the tasks docs (#18766)
hugodutkaJul 7, 2025
094bca2
ci: bump the github-actions group with 6 updates (#18769)
dependabot[bot]Jul 7, 2025
626547c
chore: bump go.nhat.io/otelsql from 0.15.0 to 0.16.0 (#18768)
dependabot[bot]Jul 7, 2025
cbac5aa
docs: fix markdown in Windsurf doc (#18753)
EdwardAngertJul 7, 2025
f9f2f6a
chore: bump github.com/go-playground/validator/v10 from 10.26.0 to 10…
dependabot[bot]Jul 7, 2025
fd13c7a
chore: bump github.com/valyala/fasthttp from 1.62.0 to 1.63.0 (#18771)
dependabot[bot]Jul 7, 2025
1d7c284
chore: fix some small groups and acl typos (#18732)
aslilacJul 7, 2025
bba0ed6
fix: return 404 instead of 401 for missing OAuth2 apps (#18755)
ThomasK33Jul 7, 2025
c70c533
Merge branch 'main' into dynamic-params-beta
stirbyJul 7, 2025
835b4c5
removed old dynamic parameter docs
stirbyJul 7, 2025
3244e7b
fmt
stirbyJul 7, 2025
71a7aa7
make; spellings
EdwardAngertJul 7, 2025
eda6507
edit dynamic-params
EdwardAngertJul 7, 2025
786f6f4
md and spelling
EdwardAngertJul 7, 2025
db53358
md syntax
EdwardAngertJul 7, 2025
8a38e33
image link
EdwardAngertJul 7, 2025
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
PrevPrevious commit
NextNext commit
feat: implement OAuth2 dynamic client registration (RFC 7591/7592) (#…
…18645)# Implement OAuth2 Dynamic Client Registration (RFC 7591/7592)This PR implements OAuth2 Dynamic Client Registration according to RFC 7591 and Client Configuration Management according to RFC 7592. These standards allow OAuth2 clients to register themselves programmatically with Coder as an authorization server.Key changes include:1. Added database schema extensions to support RFC 7591/7592 fields in the `oauth2_provider_apps` table2. Implemented `/oauth2/register` endpoint for dynamic client registration (RFC 7591)3. Added client configuration management endpoints (RFC 7592):   - GET/PUT/DELETE `/oauth2/clients/{client_id}`   - Registration access token validation middleware4. Added comprehensive validation for OAuth2 client metadata:   - URI validation with support for custom schemes for native apps   - Grant type and response type validation   - Token endpoint authentication method validation5. Enhanced developer documentation with:   - RFC compliance guidelines   - Testing best practices to avoid race conditions   - Systematic debugging approaches for OAuth2 implementationsThe implementation follows security best practices from the RFCs, including proper token handling, secure defaults, and appropriate error responses. This enables third-party applications to integrate with Coder's OAuth2 provider capabilities programmatically.
  • Loading branch information
@ThomasK33@stirby
ThomasK33 authored andstirby committedJul 7, 2025
commit9c616b9207dcb1ce50bdc51f6d373195f70f9ac8
116 changes: 116 additions & 0 deletionsCLAUDE.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -196,6 +196,32 @@ The frontend is contained in the site folder.

For building Frontend refer to [this document](docs/about/contributing/frontend.md)

## RFC Compliance Development

### Implementing Standard Protocols

When implementing standard protocols (OAuth2, OpenID Connect, etc.):

1. **Fetch and Analyze Official RFCs**:
- Always read the actual RFC specifications before implementation
- Use WebFetch tool to get current RFC content for compliance verification
- Document RFC requirements in code comments

2. **Default Values Matter**:
- Pay close attention to RFC-specified default values
- Example: RFC 7591 specifies `client_secret_basic` as default, not `client_secret_post`
- Ensure consistency between database migrations and application code

3. **Security Requirements**:
- Follow RFC security considerations precisely
- Example: RFC 7592 prohibits returning registration access tokens in GET responses
- Implement proper error responses per protocol specifications

4. **Validation Compliance**:
- Implement comprehensive validation per RFC requirements
- Support protocol-specific features (e.g., custom schemes for native OAuth2 apps)
- Test edge cases defined in specifications

## Common Patterns

### OAuth2/Authentication Work
Expand DownExpand Up@@ -270,6 +296,32 @@ if errors.Is(err, errInvalidPKCE) {
- Test both positive and negative cases
- Use `testutil.WaitLong` for timeouts in tests

## Testing Best Practices

### Avoiding Race Conditions

1. **Unique Test Identifiers**:
- Never use hardcoded names in concurrent tests
- Use `time.Now().UnixNano()` or similar for unique identifiers
- Example: `fmt.Sprintf("test-client-%s-%d", t.Name(), time.Now().UnixNano())`

2. **Database Constraint Awareness**:
- Understand unique constraints that can cause test conflicts
- Generate unique values for all constrained fields
- Test name isolation prevents cross-test interference

### RFC Protocol Testing

1. **Compliance Test Coverage**:
- Test all RFC-defined error codes and responses
- Validate proper HTTP status codes for different scenarios
- Test protocol-specific edge cases (URI formats, token formats, etc.)

2. **Security Boundary Testing**:
- Test client isolation and privilege separation
- Verify information disclosure protections
- Test token security and proper invalidation

## Code Navigation and Investigation

### Using Go LSP Tools (STRONGLY RECOMMENDED)
Expand DownExpand Up@@ -409,3 +461,67 @@ Always run the full test suite after OAuth2 changes:
7. **OAuth2 tests failing but scripts working** - Check in-memory database implementations in `dbmem.go`
8. **Resource indicator validation failing** - Ensure database stores and retrieves resource parameters correctly
9. **PKCE tests failing** - Verify both authorization code storage and token exchange handle PKCE fields
10. **Race conditions in tests** - Use unique identifiers instead of hardcoded names
11. **RFC compliance failures** - Verify against actual RFC specifications, not assumptions
12. **Authorization context errors in public endpoints** - Use `dbauthz.AsSystemRestricted(ctx)` pattern
13. **Default value mismatches** - Ensure database migrations match application code defaults
14. **Bearer token authentication issues** - Check token extraction precedence and format validation
15. **URI validation failures** - Support both standard schemes and custom schemes per protocol requirements
16. **Log message formatting errors** - Use lowercase, descriptive messages without special characters

## Systematic Debugging Approach

### Multi-Issue Problem Solving

When facing multiple failing tests or complex integration issues:

1. **Identify Root Causes**:
- Run failing tests individually to isolate issues
- Use LSP tools to trace through call chains
- Check both compilation and runtime errors

2. **Fix in Logical Order**:
- Address compilation issues first (imports, syntax)
- Fix authorization and RBAC issues next
- Resolve business logic and validation issues
- Handle edge cases and race conditions last

3. **Verification Strategy**:
- Test each fix individually before moving to next issue
- Use `make lint` and `make gen` after database changes
- Verify RFC compliance with actual specifications
- Run comprehensive test suites before considering complete

### Authorization Context Patterns

Common patterns for different endpoint types:

```go
// Public endpoints needing system access (OAuth2 registration)
app, err := api.Database.GetOAuth2ProviderAppByClientID(dbauthz.AsSystemRestricted(ctx), clientID)

// Authenticated endpoints with user context
app, err := api.Database.GetOAuth2ProviderAppByClientID(ctx, clientID)

// System operations in middleware
roles, err := db.GetAuthorizationUserRoles(dbauthz.AsSystemRestricted(ctx), userID)
```

## Protocol Implementation Checklist

### OAuth2/Authentication Protocol Implementation

Before completing OAuth2 or authentication feature work:

- [ ] Verify RFC compliance by reading actual specifications
- [ ] Implement proper error response formats per protocol
- [ ] Add comprehensive validation for all protocol fields
- [ ] Test security boundaries and token handling
- [ ] Update RBAC permissions for new resources
- [ ] Add audit logging support if applicable
- [ ] Create database migrations with proper defaults
- [ ] Update in-memory database implementations
- [ ] Add comprehensive test coverage including edge cases
- [ ] Verify linting and formatting compliance
- [ ] Test both positive and negative scenarios
- [ ] Document protocol-specific patterns and requirements
Loading

[8]ページ先頭

©2009-2025 Movatter.jp