Make client-credentials token refresh buffer and jitter configurable
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
まず、issue で参照されている src/main/java/dev/openfga/sdk/api/auth/AccessToken.java と src/main/java/dev/openfga/sdk/constants/FgaConstants.java を読み、ハードコードされた有効期限バッファーとジッターの場所を特定します。client-credentials トークンがどのようにキャッシュされ、更新されるかを追跡し、両方の値を設定可能にしたうえで、5 分間のトークンをより小さいバッファーとジッターで再利用できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Checklist
- I agree to the terms within the OpenFGA Code of Conduct.
Describe the problem you'd like to have solved
In SDK 0.9.11, the client-credentials token expiry buffer is hardcoded to 300 seconds, plus 0–299 seconds of jitter. With Keycloak issuing 300-second access tokens, a freshly cached token is immediately considered stale. Sequential API calls therefore request new tokens instead of reusing them.
Describe the ideal solution
Allow configuring the refresh buffer and jitter, for example a 30-second buffer with a small jitter for five-minute tokens.
Alternatives and current workarounds
Increasing the Keycloak client's token lifetime avoids the mismatch, but requires longer-lived tokens to accommodate the SDK.
References
- 主要言語
- Java
- スター
- 55
- フォーク
- 26
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openfga/java-sdk のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
openfga/java-sdk#370 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
openfga/java-sdk#361 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-discussion
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
openfga/java-sdk の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
commonmark/commonmark-java#460 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
GoogleCloudPlatform/spring-cloud-gcp#4664 ·
メンテナーはふだん 1 日以内に返信
-
enhancement user story
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100