How to intercept M2M token in OpenFGA's API calls ?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- api, authentication
調査の方向性
まず、issue に記載されているカスタム OpenFGA bean と RestClient requestInterceptor を確認し、続いて store-creation と AuthorizationModel の API 呼び出しを追跡します。M2M token がどこで作成され、それが各 request の authorization header に到達しているかを確認します。呼び出しが invalid bearer token エラーなしで正常に認証されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Sub - Issue with Bearer Token and Store Creation in OpenFGA
I'm currently working with OpenFGA and I have a custom bean that overrides the default OpenFGA bean. The goal is to ensure that a store is created only once. When creating the store, if it doesn't already exist, it should be automatically created, and the store ID should be added to other AuthorizationModel APIs.
However, I'm running into an issue. I keep getting the error message "invalid bearer token." The M2M token is being created successfully, but for some reason, it’s not being properly intercepted when the store is created within the custom bean. This is causing the token to be invalid during the API calls.
As a workaround, I tried switching to direct API calls using the RestClient to call OpenFGA APIs. The RestClient provides an option for requestInterceptor(), but I’m struggling to set the M2M token in the header correctly. Despite my efforts, the token is still not being passed correctly, and I continue to face authentication issues.
Has anyone encountered a similar problem or have any advice on how to intercept and set the M2M token in the header when using the RestClient? Any insights or solutions would be greatly appreciated!
Thanks in advance!
Version of SDK
v0.4.0
- 主要言語
- 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 日以内に返信
-
Make client-credentials token refresh buffer and jitter configurable対応中かも @dpkass が 29 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/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 日以内に返信
openfga/java-sdk の issue をすべて見る
似ている issue
-
`Processing lsp` never exits and leaves orphaned processes対応中かも @overcast302 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
processing/processing4#1578 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
メンテナーはふだん 1 日以内に返信
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched origins対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
floci-io/floci#5369 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
securityHeaders replaces a route's own Content-Security-Policy (0.9.9; weakens embedders' pages)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sqlcipher/sqlcipher-android#97 · コメント 1 件 ·