Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#4,231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
冷清
技术栈
go

调研方向

从 auth/cmd 和 auth/config.go 开始,追踪新 grant-types-enabled 设置的注册和加载,然后继续跟踪 OpenID4VPClient 和 AuthorizationServerMetadata 的构造。更新受影响的测试、server_options.rst 和发布说明;完成的标准是启用的集合同时控制客户端行为和公布的 grant_types_supported,并移除旧 flag。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Go
星标
29
派生
24
平均合并
2 天 18 小时
30 天内合并 PR
45

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nuts-foundation/nuts-node 的其他 Issue

查看 nuts-foundation/nuts-node 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。