Skip to content

Commit 4386fbe

Browse files
feat(databases): warn when a stored JWT is expired or expiring (#46036)
1 parent bb88764 commit 4386fbe

18 files changed

Lines changed: 1738 additions & 11 deletions

File tree

‎UPDATING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ assists people when migrating to a new version.
108108
Whatever the setting, `engine_information` on the database endpoints gains
109109
`encrypted_extra_sensitive_fields`, the engine's declared sensitive paths
110110
and labels, and `GET /api/v1/database/<pk>/connection` lists the fields
111-
stored in that database instead.
111+
stored in that database instead, plus `encrypted_extra_expirations`, when
112+
each stored JWT expires.
112113

113114
- With `ENABLE_VIEWERS` and `VIEWER_PROMISCUOUS_MODE` on, the dashboard grant
114115
follows the legacy `DASHBOARD_RBAC` model: only the listed viewers of a

‎docs/admin_docs/configuration/configuring-superset.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ with an eye that reveals its ending on request.
289289
- For a PEM private key, the ending comes from its base64 body, without the
290290
fixed footer, the line breaks or the padding.
291291
- A stored JWT also shows when it expires, read from its `exp` claim without
292-
verifying the signature; no other claim is read.
292+
verifying the signature; no other claim is read. The warning shown when the
293+
modal opens on an expired or expiring JWT does not depend on this setting:
294+
it reads the expiry from `GET /api/v1/database/<pk>/connection`.
293295
- The endings come from
294296
`GET /api/v1/database/<pk>/encrypted_extra_hints/`, which requires the same
295297
permission as editing the database. Each call is recorded in the event log.

‎docs/static/resources/openapi.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7854,6 +7854,20 @@
78547854
},
78557855
"type": "object"
78567856
},
7857+
"EncryptedExtraExpiration": {
7858+
"properties": {
7859+
"expired": {
7860+
"description": "Whether the stored JWT has expired",
7861+
"type": "boolean"
7862+
},
7863+
"expires_at": {
7864+
"description": "When the stored JWT expires, from its exp claim, in UTC",
7865+
"format": "date-time",
7866+
"type": "string"
7867+
}
7868+
},
7869+
"type": "object"
7870+
},
78577871
"EncryptedExtraHintSchema": {
78587872
"properties": {
78597873
"expired": {
@@ -7904,6 +7918,13 @@
79047918
"description": "SSH tunnel is not available to the database",
79057919
"type": "boolean"
79067920
},
7921+
"encrypted_extra_expirations": {
7922+
"additionalProperties": {
7923+
"$ref": "#/components/schemas/EncryptedExtraExpiration"
7924+
},
7925+
"description": "On `/connection` only: JSONPath of each stored sensitive encrypted_extra field holding a JWT with an exp claim, and when it expires. The signature is not verified.",
7926+
"type": "object"
7927+
},
79077928
"encrypted_extra_sensitive_fields": {
79087929
"additionalProperties": {
79097930
"type": "string"

0 commit comments

Comments
 (0)