This PR adds the ability to revoke access tokens for the LLM service.
There is a new `revoked_access_tokens` table that contains the
identifiers (`jti`) of revoked access tokens.
To revoke an access token, insert a record into this table:
```sql
insert into revoked_access_tokens (jti) values ('1e887b9e-37f5-49e8-8feb-3274e5a86b67');
```
We now attach the `jti` as `authn.jti` to the tracing spans so that we
can associate an access token with a given request to the LLM service.
Release Notes:
- N/A
11 lines
219 B
Rust
11 lines
219 B
Rust
use sea_orm::{entity::prelude::*, DbErr};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::id_type;
|
|
|
|
id_type!(ModelId);
|
|
id_type!(ProviderId);
|
|
id_type!(UsageId);
|
|
id_type!(UsageMeasureId);
|
|
id_type!(RevokedAccessTokenId);
|