alloy-rs / alloy-rs/alloy

[Bug] AuthLayer produces JWT with "exp" claim set to null

オープン
#4,031 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Rust
スター
1.3k
フォーク
668
平均マージ
2日 1時間
マージ済み PR(30日)
29

説明

### Component

transports

### What version of Alloy are you on?

2.0.5

### Operating System

None

### Describe the bug

AuthLayer inserts Authorization header with a JWT that is rejected as invalid by some execution clients (Besu). The reason is that the claim set in this JWT is serialized as `{"iat": , "exp": null}`: that is, instead of omitting `exp` claim, it is specified with `null` value.
Per RFC7519, §4.1.4, the value of `exp` claim must be a number.

Suggestion: set up serialization of `Claims` so that when `exp` has `None` value, it is omitted from the serialized representation.

Note also that Engine API specification does not specify the use of `exp`, it only uses `iat` for staleness detection; not sure why `exp` is included into the JWT used to authenticate Engine API.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。