Make `HeaderValue::set_sensitive` available in const contexts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu từ các định nghĩa của HeaderValue::set_sensitive và HeaderValue::from_static, đồng thời kiểm tra tài liệu và các bài kiểm thử xung quanh. Làm cho set_sensitive có thể được sử dụng trong các ngữ cảnh const, thêm cảnh báo được yêu cầu về việc nhúng bí mật nếu phù hợp, và xác minh rằng hành vi hiện có của HeaderValue vẫn được kiểm thử đầy đủ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hey, I'd like to use HeaderValue::set_sensitive when defining header value constants with HeaderValue::from_static.
In particular, I'd like to mark an OAuth client credential that's compiled into the application as sensitive.
I fully understand that a value that's compiled into the binary is trivial to dump and shouldn't be considered secure. Moreover, I fully understand that no amount of obfuscation will change this. However, many OAuth implementations (like GitHub or Forgejo) always issue client credentials, regardless of whether the client is public or confidential. This means clients are forced to use the credential, which effectively means the credential has to be embedded into the client.
I'd be willing to contribute a PR for this, but I wanted to open an issue to discuss first, as the idea of storing confidential header values as constants seems controversial. In addition to the const keyword, a note in the doc comment to discourage developers from embedding secrets might be warranted.
Thank you for creating Hyper and this crate!
- Ngôn ngữ chính
- Rust
- Star
- 1.4k
- Fork
- 378
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 hyperium/http
-
Độ khó 2/5 1-3 giờ 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 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Tất cả issue của hyperium/http
Issue tương tự
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Đang mởbug CLI custom-model
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
Missing examples for `Allocator` Đang mởA-allocators A-docs C-enhancement T-libs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100