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

Add Rest endpoints #89

Merged
merged 13 commits into from
Mar 14, 2024
Merged

Add Rest endpoints #89

merged 13 commits into from
Mar 14, 2024

Conversation

ZoopOTheGoop
Copy link
Contributor

@ZoopOTheGoop ZoopOTheGoop commented Feb 27, 2024

These are both relatively simple implementations and multiplexing a REST endpoint is the only "hard" part.

Requires #88 being merged.

Fixes #63 Fixes #64

@ZoopOTheGoop ZoopOTheGoop self-assigned this Feb 27, 2024
@ZoopOTheGoop ZoopOTheGoop marked this pull request as draft February 27, 2024 05:04
@ZoopOTheGoop ZoopOTheGoop force-pushed the rest-endpoints branch 4 times, most recently from 1a67201 to a5ca5b2 Compare March 1, 2024 05:59
src/features/admin/log_level/mod.rs Outdated Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Outdated Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Show resolved Hide resolved
src/features/admin/log_level/service/rest.rs Show resolved Hide resolved
src/features/admin/log_level/mod.rs Outdated Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Outdated Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Show resolved Hide resolved
src/features/admin/log_level/service/mod.rs Show resolved Hide resolved
src/features/admin/log_level/service/rest.rs Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
src/app/interfaces/servers/rest/mod.rs Outdated Show resolved Hide resolved
@ZoopOTheGoop ZoopOTheGoop force-pushed the rest-endpoints branch 7 times, most recently from c5bffcf to a7f6823 Compare March 7, 2024 07:41
@ZoopOTheGoop ZoopOTheGoop marked this pull request as ready for review March 7, 2024 11:19
Currently, tests use `init_tracing` for prettier logging, but this conflicts with `Infrastructure`, which initializes logging inside itself.
@ZoopOTheGoop ZoopOTheGoop requested a review from tim-hm March 7, 2024 11:49
Zoe Spellman added 2 commits March 7, 2024 22:31
REST is going to require admin authentication, instead of the JWT token signing we do now just for valid client hashes. So we need to move the authentication to a more reusable form.

This has a couple incidental changes like introducing `secrecy` which lets us shred secrets in memory when they go out of scope. Minor benefit, but I added it for the password secrets so may as well use it for JWT too.
Zoe Spellman added 5 commits March 8, 2024 00:56
Since the authenticator got moved out of GRPC into its own thing, the two servers both live alone in a module folder, so just move them up a level because it's cleaner.
Copy link
Contributor

@tim-hm tim-hm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! As discussed on our call there are some bits to revisit down the road but I think this can be merged as-is.

Bits to revisit:

  • We don't expose admin endpoints publicly so do they need user/pass?
  • In the event we need to toggle the log level live, probably easier as a query parameter, for example GET /v1/admin/log_level?level=info

@ZoopOTheGoop ZoopOTheGoop merged commit 9d9905f into dev Mar 14, 2024
3 checks passed
@ZoopOTheGoop ZoopOTheGoop deleted the rest-endpoints branch March 14, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add endpoint for setting log level at runtime feat: expose api version check
2 participants