kernelci / kernelci/kernelci-api

Persistent API keys

オープン
#414 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
10
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

説明

At the moment, a user can login and get a JWT token. These tokens aren't stored in the database and have a baked-in expiry time. They're used for temporary sessions, typically by web browsers. This is fine and we'll definitely need this kind of tokens, but it's not designed to be used for automation tools that use the API continuously such as pipeline services.

In addition to the JWT, we should create another kind of tokens which we might call "API access keys". These would be stored in the database and could be revoked by the user. They may also have an expiry date and scopes to fine-tune the operations that can be performed with them. This is how most web APIs work, with persistent credentials for this kind of use-case. I don't think `fastapi-users` can support both, but it can support one or the other:

https://fastapi-users.github.io/fastapi-users/10.0/configuration/authentication/

In our particular case, I would like to suggest that we use the persistent API keys as a way to get a temporary JWT token. So a user can interactively login with a username / password interactive form or non-interactively by sending an access token. Then a short-lived JWT token is generated (say, valid for 1h) and when it expires a new one needs to be generated.

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

No repository files, tests, or entry points are identified in the issue; start with the fastapi-users authentication configuration linked in the description and trace the existing JWT login flow. Define the persistent key model, revocation, optional expiry and scopes, and exchange flow, with short-lived JWT renewal working for both interactive and non-interactive login.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
fastapi, python
領域
api, authentication
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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