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

Implement Admin API #337

Merged
merged 14 commits into from
Nov 25, 2024
Merged

Implement Admin API #337

merged 14 commits into from
Nov 25, 2024

Conversation

MrOrz
Copy link
Member

@MrOrz MrOrz commented May 12, 2024

Design doc: https://g0v.hackmd.io/um7DyY_ESbu2LL78kLw3pg?view#API

  • Implement feTS OpenAPI server under src/adm
    • OpenAPI spec definition (input & output) is in src/admin/index
    • Utility function goes to src/adm/util
    • Handler logic goes to src/adm/handlers
  • Check Cloudflare token on production (and staging) environments https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/#javascript-example
  • Auth plugin that extracts user information and reject non-Cloudflare connections (on staging & production)
  • Audit log for all requests on production (and staging) environments. Data include:
    • user (email or service token's client ID)
    • command (endpoint URL)
    • command args (request)
    • response

@coveralls
Copy link

coveralls commented May 12, 2024

Coverage Status

coverage: 88.312%. remained the same
when pulling 8aa0a79 on pubsub-cmd
into 0179daa on master.

@coveralls
Copy link

coveralls commented Nov 14, 2024

Coverage Status

coverage: 83.371%. remained the same
when pulling d4407a1 on pubsub-cmd
into a43812f on master.

@MrOrz MrOrz changed the title feat(scripts): main function stub Implement Admin API Nov 17, 2024
@MrOrz MrOrz self-assigned this Nov 17, 2024
@MrOrz MrOrz marked this pull request as ready for review November 17, 2024 17:57
- Docker environment does not include pm2 app name in the logs
- also split audit log and auth plugins
@MrOrz MrOrz merged commit 4a47587 into master Nov 25, 2024
4 checks passed
@MrOrz MrOrz deleted the pubsub-cmd branch November 25, 2024 05:09
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.

4 participants