Skip to content
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

Protect ASAB API #664

Merged
merged 8 commits into from
Jan 27, 2025
Merged

Protect ASAB API #664

merged 8 commits into from
Jan 27, 2025

Conversation

byewokko
Copy link
Collaborator

@byewokko byewokko commented Jan 22, 2025

  • Implemented @asab.web.auth.require_superuser decorator.
  • Some ASAB API endpoints now require authorization, while the sensitive ones have been disabled completely.

ASAB API

Core

  • /asab/v1/api/config has been disabled.
  • /asab/v1/api/environ has been disabled.
  • /asab/v1/api/manifest is open.
  • /asab/v1/api/changelog is open.

Logs

  • /asab/v1/api/log requires asab:service:access authorization.
  • /asab/v1/api/logws requires asab:service:access authorization.

OpenAPI and Swagger docs

  • /doc is open.
  • /asab/v1/openapi is open.
  • /oauth2-redirect.html is open.

Metrics

  • /asab/v1/api/metrics is open*.
  • /asab/v1/api/watch_metrics is open*.
  • /asab/v1/api/metrics.json is open*.

*Metrics should be eventually protected (asab:service:access) but that would block Prometheus at the moment. I leave them open until client credentials grant is implemented in Seacat Auth.

@byewokko byewokko added the enhancement New feature or request label Jan 22, 2025
@byewokko byewokko self-assigned this Jan 22, 2025
@byewokko byewokko requested a review from ateska January 24, 2025 15:33
@byewokko byewokko merged commit 2e434bd into master Jan 27, 2025
10 checks passed
@byewokko byewokko deleted the feature/protect-asab-api branch January 27, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant