Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Replace experimental jwt-bearer client flag with a grant-types-enabled config

Đang mở
#4,231 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
api, authentication

Hướng nghiên cứu

Bắt đầu trong auth/cmd và auth/config.go để theo dõi việc đăng ký và tải thiết lập grant-types-enabled mới, sau đó theo dõi quá trình xây dựng OpenID4VPClient và AuthorizationServerMetadata. Cập nhật các test bị ảnh hưởng, server_options.rst và ghi chú phát hành; hoàn tất khi tập hợp được bật kiểm soát cả hành vi của client lẫn grant_types_supported được công bố, đồng thời flag cũ đã được loại bỏ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

auth

Background

PR #4227 added auth.experimental.jwt_bearer_client (bool, default false) to gate the new RFC 7523 jwt-bearer two-VP client flow. During review @reinkrul suggested replacing it with a list-style config so the same mechanism can later enable/disable other grant types (authorization_code, vp_token-bearer, openid4vp, etc.).

We agreed to defer the refactor (rather than do it inside #4227) because doing it properly means touching every grant type that we currently support unconditionally, not just the new one.

Proposed change

Introduce a list-style config:

auth.granttypesenabled: [authorization_code, urn:ietf:params:oauth:grant-type:vp_token-bearer]
  • Default: the grant types we currently support without a flag (authorization_code, vp_token-bearer).
  • Operators opt into the experimental two-VP flow by appending urn:ietf:params:oauth:grant-type:jwt-bearer.
  • Drop auth.Config.Experimental.JwtBearerClient once the new config is in place.

Knock-on: AS metadata advertisement

The same config should drive what the local Authorization Server advertises in its metadata under grant_types_supported. Today the metadata is built from a fixed list; once the config exists, the metadata builder must read from it so AS clients can negotiate correctly.

This is the main reason we deferred the refactor out of #4227: the metadata thread reaches further than the client-side gate, and doing it half-way would hide the change from any peer node fetching our AS metadata.

Scope

  • New config field + flag registration in `auth/cmd` and `auth/config.go`.
  • Replace the `OpenID4VPClient.experimentalJwtBearerClient bool` with a membership check against the enabled set.
  • Wire the same set into `AuthorizationServerMetadata.GrantTypesSupported` construction.
  • Migrate / remove `auth.experimental.jwt_bearer_client`.
  • Update tests, docs (`server_options.rst`), and the release notes.

Related

  • PR #4227 — introduced the boolean flag this issue replaces.
  • PRD #4078 — overall RFC 7523 jwt-bearer client work.
Ngôn ngữ chính
Go
Star
29
Fork
24
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nuts-foundation/nuts-node

Tất cả issue của nuts-foundation/nuts-node

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.