Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Persistent API keys

Offen
#414 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
fastapi, python
Bereich
api, authentication

Rechercherichtung

Im Issue sind keine Repository-Dateien, Tests oder Einstiegspunkte identifiziert; beginne mit der in der Beschreibung verlinkten fastapi-users-Authentifizierungskonfiguration und verfolge den bestehenden JWT-Login-Ablauf. Definiere das Modell für persistente Schlüssel, den Widerruf, den optionalen Ablauf und die Scopes sowie den Austauschablauf, wobei die Erneuerung kurzlebiger JWTs sowohl für interaktives als auch für nicht-interaktives Login funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
10
Forks
21
Ø Merge
22 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus kernelci/kernelci-api

Alle Issues in kernelci/kernelci-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.