Skip to content

feat: Add Live Event Subscriptions API with feature flag - #2645

Open
jasonfill wants to merge 1 commit into
instructure:masterfrom
SmarterServices:feature/live-event-subscriptions-api
Open

feat: Add Live Event Subscriptions API with feature flag#2645
jasonfill wants to merge 1 commit into
instructure:masterfrom
SmarterServices:feature/live-event-subscriptions-api

Conversation

@jasonfill

Copy link
Copy Markdown

Note

This could not be fully tested due to limited access to the live event service via the open source distribution.

Summary

Adds a read-only API for auditing Live Event subscriptions configured for a root account.

New endpoints

  • GET /api/v1/accounts/:account_id/live_event_subscriptions — list all subscriptions
  • GET /api/v1/accounts/:account_id/live_event_subscriptions/:id — show single subscription

Proxies to Services::LiveEventsSubscriptionService and masks sensitive fields (AWS keys, secrets, credentials, tokens) via regex pattern matching. URLs have auth credentials and query params masked; base URLs are preserved.

Gated behind live_event_subscriptions_api feature flag (hidden, allowed_on in dev/CI). Requires manage_data_services permission and root account context — sub-accounts return 400.

Files changed

File Status
app/controllers/live_event_subscriptions_controller.rb New
config/feature_flags/00_standard.yml Modified
config/routes.rb Modified
spec/apis/v1/live_event_subscriptions_api_spec.rb New

Test plan

  • Enable live_event_subscriptions_api feature flag on a root account
  • GET /api/v1/accounts/:id/live_event_subscriptions — verify subscriptions are returned with sensitive fields masked
  • GET /api/v1/accounts/:id/live_event_subscriptions/:id — verify single subscription with masked fields
  • Verify sub-account requests return 400
  • Verify non-admin users return 401
  • Verify disabled feature flag returns 404

Read-only API endpoints for auditing live event
subscriptions configured for a root account.
Sensitive fields are masked in the response.

flag=live_event_subscriptions_api

test plan:
- enable live_event_subscriptions_api feature flag
- GET /api/v1/accounts/:id/live_event_subscriptions
- verify sensitive fields are masked
- verify sub-accounts return 400
- verify non-admins return 401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant