-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Enforce custom auth userId value #457
Conversation
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
CI Failure Feedback 🧐(Checks updated until commit 6c060e3)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
fbf607d
to
e4fde5d
Compare
e4fde5d
to
c57e3de
Compare
Require that a cluster's
customAuthHandler
returns an object with keyuserId
(Other keys are allowed withz.passthrough()
).This value is used as the Run's
userId
(prefixed withcustom:
) and validated for run ownership.This allows for tokens to be refreshed while still providing access to the existing runs by allowing the
customAuthHandler
to provide the identity.Description
Enforced
userId
as the key for custom authentication.Updated
extractCustomAuthState
to useuserId
consistently.Added schema validation for custom authentication results.
Removed unused
getRunCustomAuthToken
function.Changes walkthrough 📝
auth.test.ts
Update tests for custom authentication changes
control-plane/src/modules/auth/auth.test.ts
userId
instead ofsomeAuthValue
.entityId
logic.auth.ts
Refactor custom authentication logic
control-plane/src/modules/auth/auth.ts
entityId
value withcustom:${context.userId}
.userId
for run access.getRunCustomAuthToken
.custom.ts
Add schema validation for custom auth results
control-plane/src/modules/auth/custom.ts
zod
schema for validating custom auth results.verify
function.workflows.ts
Remove unused custom auth token function
control-plane/src/modules/workflows/workflows.ts
getRunCustomAuthToken
function.