-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use middleware to verify secret key #4338
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
Conversation
922d993 to
ff3c703
Compare
crates/goose-server/src/auth.rs
Outdated
| response::Response, | ||
| }; | ||
|
|
||
| pub async fn layer_fn( |
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.
is this the normal way to name these? check_token would be easier to follow
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.
Nope it's just a bad name
| @@ -1,12 +1,14 @@ | |||
| use std::sync::Arc; | |||
|
|
|||
| use crate::configuration; | |||
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.
we should really name this differently :) I was like, why is this in agent.rs
ui/desktop/src/goosed.ts
Outdated
| headers: { | ||
| 'X-Secret-Key': secret, | ||
| }, | ||
| }); |
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.
could we use the generated API at this point or would it not be ready (or is it only on the other side?)
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.
looks like we don't actually add this endpoint to the generated client. It's also a bit of a mixed bag all over where we do vs don't use the generated client. I'll have a look at cleaning that up too, as this PR is kind of a logical place to do it
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.
yeah, it's all over the place. we should really set an alert on getSecret appearing in PRs
# Conflicts: # crates/goose-server/src/commands/agent.rs # crates/goose-server/src/routes/agent.rs # crates/goose-server/src/routes/audio.rs # crates/goose-server/src/routes/config_management.rs # crates/goose-server/src/routes/context.rs # crates/goose-server/src/routes/extension.rs # crates/goose-server/src/routes/reply.rs # crates/goose-server/src/routes/session.rs # crates/goose-server/src/state.rs # crates/goose-server/tests/pricing_api_test.rs
ff3c703 to
fda12f7
Compare
…data * 'main' of github.com:block/goose: improve auto scroll to bottom + detection (#4504) Fix unable to get access to microphone in Mac app (#4571) Use middleware to verify secret key (#4338) adding Vercel MCP (#4562) docs: reorganizing CLI commands (#4566) Desktop import yaml recipes (#4544)
Signed-off-by: Matt Donovan <[email protected]>
- Adapt to middleware-based authentication from PR #4338 - Remove verify_secret_key in favor of middleware auth - Update AppState initialization to match new signature - Preserve all Agent Manager functionality for per-session isolation - Keep graceful shutdown improvements for cleanup task - Fix test compilation issues with RawTextContent meta field This completes the Agent Manager POC addressing Discussion #4389: - Each session gets its own isolated agent - Extensions don't interfere between sessions - Cleanup task manages memory with graceful shutdown - Foundation laid for scheduler/recipe integration
Signed-off-by: HikaruEgashira <[email protected]>
No description provided.