-
-
Notifications
You must be signed in to change notification settings - Fork 318
fix(security): reserve integration secrets to admins, and remove the shell from the backup chain #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(security): reserve integration secrets to admins, and remove the shell from the backup chain #3005
Changes from all commits
8098a2a
4d5de9e
2f3e52b
091719c
33ae3e8
efb91e1
2b2a9d1
cef4615
adf4e2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -409,9 +409,13 @@ function getRoutes(gladys) { | |
| admin: true, | ||
| controller: gatewayController.createBackup, | ||
| }, | ||
| // reachable without authentication while the instance has no user (signup | ||
| // restore flow), and it makes the server download and unpack a remote file: | ||
| // rate limited like the other pre-authentication routes | ||
| 'post /api/v1/gateway/backup/restore': { | ||
| authenticatedOrNotConfigured: true, | ||
| admin: true, | ||
| rateLimit: true, | ||
| controller: gatewayController.restoreBackup, | ||
| }, | ||
| 'get /api/v1/gateway/backup/restore/status': { | ||
|
|
@@ -825,12 +829,18 @@ function getRoutes(gladys) { | |
| authenticated: true, | ||
| controller: variableController.getByLocalService, | ||
| }, | ||
| // global variables hold instance-wide secrets (Gladys Plus keys, backup | ||
| // keys...): reading and writing them is reserved to admins. Per-user | ||
| // settings go through /api/v1/user/variable below, which stays open to | ||
| // every authenticated user. | ||
| 'post /api/v1/variable/:variable_key': { | ||
| authenticated: true, | ||
| admin: true, | ||
| controller: variableController.setValue, | ||
| }, | ||
| 'get /api/v1/variable/:variable_key': { | ||
| authenticated: true, | ||
| admin: true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restricting these routes is correct, but two front surfaces still reachable by non-admins consume them and weren't adjusted:
The PR body documents the 403 behaviour change, so this may be intended — but as it stands habitants get error states on screens they can still navigate to. Either hide these tabs/pages for non-admins (here or in a follow-up), or gate the fetches like the Telegram page. At minimum the OpenAI weekly digest card is worth handling in this PR, since the integrations catalog still shows that page to them. Generated by Claude Code |
||
| controller: variableController.getValue, | ||
| }, | ||
| 'post /api/v1/user/variable/:variable_key': { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.