Workload identity: three small hardening gaps (act member types, key fetch limit past 64 issuers, duplicate trust rules)
@ThomasK33 đang làm issue này rồi.
Từ ngày 19/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Three small gaps in workload identity on main. Reviewers and verifiers found them on #63, #65 and #69. None of them can produce a wrong login result, leak data or lose an event, so none blocked a merge. They are collected here so they stay findable.
1. The act check reads member names, not values
actsForAnother in faucet/oauth/workloadtoken.go lets through an act that is an object with no members other than iat, aud, exp and nbf. It never looks at the values. So {"aud": {"sub": "other"}} and {"iat": "x"} pass.
- Why it is not a bug today: nothing in faucet reads
actafter this check, and the token is signed by an issuer the operator trusts. - Fix: require
iat,expandnbfto be JSON numbers, andaudto be a string or an array of strings, with one refused test for each. This was found on #69 by its verifier and by Superblink.
2. The once-a-minute key fetch limit is lost past 64 issuers
keySource in faucet/oauth/workloadkeys.go stores the time of an issuer's last fetch in the same cache entry that the 64-issuer cap evicts.
- What goes wrong: once more than 64 discovery issuers are configured across all clients, a caller who cycles tokens across them makes each request miss the cache and cost about two outbound fetches.
- Why it is not a bug today: faucet only fetches issuers that an operator stored in a trust rule. Production has one.
- Fix: keep the last-fetch time apart from the cached keys, or never evict an entry whose limit has not run out. This was found on #61 and deferred there.
3. The same trust rule can be stored twice
Migration 000017 keys faucet_workload_trusts by rule_hash, which is sha256(jsonb_send(...)). jsonb_send keeps a number's scale, so a pasted key set that writes 1 in one copy and 1.0 in another yields two rule IDs instead of one.
- Why it is not a bug today: both rules work and match the same tokens.
faucet clients trustsjust lists one extra rule. - Where it is documented: the store contract in
faucet/oauth/store.godescribes this behaviour, and the fake store matches it. - Fix, if wanted: normalise numbers before hashing. This was found on #63.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Ngôn ngữ chính
- Go
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 coder/faucet
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
GetBatchResponseById panics for items without a body (204/302) and for unknown idsCó thể đã có người làm @0z5a đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
JuliusBrussee/caveman#1567 ·
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 78/100
-
bug postgresql
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày