[Bug] A scoped token can end up with no name in the listing used to revoke it
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
- 48/100
Hướng nghiên cứu
Start by locating the implementations or help definitions for generate-file-system-token, generate-file-system-scoped-token, and list-file-system-tokens. Compare how --token-name and --subject reach the listing's NAME column, then decide on a consistent naming behavior or documented requirement. Re-run the listed commands in text and JSON modes; done means scoped tokens are identifiable and the help explains the required input.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
ti version
0.2.7 (6c950c77a601d0d55394c4b2f64483ae93d522db, 2026-09-27), bundled ti-drive9 companion 60b63d6
Command family
fs
Operating system and architecture
macOS 14.6, darwin/arm64
Summary
The two token commands name a token through different flags, with different requirements, and
both land in the same NAME column. A scoped token created without the optional flag has no
name at all in the listing an operator uses to find the token they want to revoke.
Covers observation 8 from a review of the TiDB Cloud Filesystem documentation.
The difference
generate-file-system-token takes --token-name, described in help as "An operational name
for the token". It is required.
generate-file-system-scoped-token has no --token-name. It has --subject, described in
help as "Optional server-side audit label". It is optional.
Command
ti fs generate-file-system-token --file-system-id "<fs-id>" --token-name owner1 --no-expiration
ti fs generate-file-system-scoped-token --file-system-id "<fs-id>" --ttl 30m --allow "/reports:read,list"
ti fs list-file-system-tokens --file-system-id "<fs-id>" --output text
Reproduction steps
- Generate an owner token with
--token-name owner1. - Generate a scoped token without passing
--subject. - Run
ti fs list-file-system-tokens --output text. - Run the same command with
--output json.
Expected behavior
Either both commands name a token the same way, or the scoped command's help states that
--subject fills the NAME column, so an operator knows to set it.
Actual behavior
TOKEN_ID NAME SCOPE STATUS EXPIRES_AT
c6bdb91f-7b09-4a6d-a01d-dd5e108d927f default owner active never
aea96970-11bf-44fd-bde7-95d0767d46be fs_scoped active 2026-09-28T04:11:11Z
af7bcbce-15a3-4069-94e9-1dfc13aaf2e3 owner1 owner active never
The scoped token's NAME column is blank, and token_name is an empty string in the JSON.
The owner token shows its name. An operator looking at the listing has no way to tell which
scoped token is which, which matters because this listing is how you find the token_id to
pass to disable-file-system-token or delete-file-system-token.
Suggested resolution
Either give generate-file-system-scoped-token a --token-name of its own, or document that
--subject doubles as the operational name and recommend setting it.
This one is partly a naming decision rather than a defect, so the docs fix depends on which
way you want it to work.
Sensitive-data confirmation
No API keys, file system or Vault tokens, database credentials, connection strings, SQL, or
customer data appear above. File systems used for these measurements were deleted afterwards.
- Ngôn ngữ chính
- Go
- Star
- 3
- Fork
- 4
- Merge trung bình
- 3 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tidbcloud/ti-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
tidbcloud/ti-cli#64 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của tidbcloud/ti-cli
Issue tương tự
-
area: metrics area: tracing contribfest enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
open-telemetry/opentelemetry-ebpf-instrumentation#4188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
blinklabs-io/dingo#6074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug remote
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
podman-container-tools/podman#30143 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
component/mesheryctl kind/bug language/go
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
meshery/meshery#22993 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100