-
Notifications
You must be signed in to change notification settings - Fork 10
feat: read only admin support #2062
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: main
Are you sure you want to change the base?
Changes from 10 commits
8e7e116
0ebc757
d9ed3aa
cceccc7
30c2a03
2ccf38e
6fde51f
be1b74f
7cd3f37
9080d40
db71893
a16a233
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,11 @@ export const INTERNAL_ROUTES = [ | |
| 'POST /consumers/register', | ||
| 'PATCH /consumers/:consumerId', | ||
| 'POST /consumers/:consumerId/revoke', | ||
|
|
||
| // API Keys - scoped API key management; end-user/admin flow, not exposed to S2S consumers | ||
| 'POST /tools/api-keys', | ||
| 'DELETE /tools/api-keys/:id', | ||
| 'GET /tools/api-keys', | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -356,11 +361,6 @@ const routeRequiredCapabilities = { | |
| // Trigger — GET triggers side effect; consider POST for RFC 7231 semantics (follow-up) | ||
| 'GET /trigger': 'audit:write', | ||
|
|
||
| // API Keys | ||
| 'POST /tools/api-keys': 'apiKey:write', | ||
| 'DELETE /tools/api-keys/:id': 'apiKey:write', | ||
| 'GET /tools/api-keys': 'apiKey:read', | ||
|
|
||
| // Import Jobs | ||
| 'POST /tools/import/jobs': 'importJob:write', | ||
| 'GET /tools/import/jobs/:jobId': 'importJob:read', | ||
|
|
@@ -400,9 +400,13 @@ const routeRequiredCapabilities = { | |
| 'GET /sites/:siteId/llmo/sheet-data/:dataSource': 'site:read', | ||
| 'GET /sites/:siteId/llmo/sheet-data/:sheetType/:dataSource': 'site:read', | ||
| 'GET /sites/:siteId/llmo/sheet-data/:sheetType/:week/:dataSource': 'site:read', | ||
| 'POST /sites/:siteId/llmo/sheet-data/:dataSource': 'site:write', | ||
| 'POST /sites/:siteId/llmo/sheet-data/:sheetType/:dataSource': 'site:write', | ||
| 'POST /sites/:siteId/llmo/sheet-data/:sheetType/:week/:dataSource': 'site:write', | ||
| // These POST sheet-data routes use POST only to accommodate complex query payloads that exceed | ||
| // URL length limits. They are non-mutating (no side effects) and intentionally require | ||
| // only site:read, which also allows read-only admins and S2S consumers with read-only tokens | ||
| // to query sheet data. | ||
| 'POST /sites/:siteId/llmo/sheet-data/:dataSource': 'site:read', | ||
|
Member
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. Important: These POST routes were downgraded from |
||
| 'POST /sites/:siteId/llmo/sheet-data/:sheetType/:dataSource': 'site:read', | ||
| 'POST /sites/:siteId/llmo/sheet-data/:sheetType/:week/:dataSource': 'site:read', | ||
| 'GET /sites/:siteId/llmo/data': 'site:read', | ||
| 'GET /sites/:siteId/llmo/data/:dataSource': 'site:read', | ||
| 'GET /sites/:siteId/llmo/data/:sheetType/:dataSource': 'site:read', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: This resolves
@adobe/spacecat-shared-http-utilsfrom a personal GitHub Gist instead of npm. The companion PR (adobe/spacecat-shared#1469) must be merged and published to npm first, then this should reference the published version. Gist-hosted tarballs bypass all supply chain controls (npm 2FA, provenance attestation, CI). The tarball also masquerades as version1.25.1while containing different code.