AlmaLinux / AlmaLinux/build-system

Increase the `access_token` length to be able to store info coming from almalinux accounts

Offen
#329 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
32
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The problem in https://github.com/AlmaLinux/build-system/issues/322 was due to our inability to store a >2048 token coming from KeyCloak into db when logging in, see:

```
web_server-1 | DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) : value too long for type character
web_server-1 | varying(2048)
web_server-1 | [SQL: INSERT INTO user_oauth_accounts (access_token, user_id, oauth_name, expires_at, refresh_token,
web_server-1 | account_id, account_email) VALUES ($1::VARCHAR, $2::INTEGER, $3::VARCHAR, $4::INTEGER, $5::VARCHAR,
web_server-1 | $6::VARCHAR, $7::VARCHAR) RETURNING user_oauth_accounts.id]
...
```

Right now, and as a solution for https://github.com/AlmaLinux/build-system/issues/322, we shrinked the information coming from KeyCloak by removing the roles from the token. That's "fine" for now, but we'll need them when we move our role based access control to our identity provider (almalinux accounts). So we'd need to increase that column size to something that is comfortable enough, [right now is at 2048](https://github.com/AlmaLinux/build-system/issues/322#issuecomment-2293799677).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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