-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feature: suborg scope support [ENG-4125] #4963
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
…at/suborg-scope-support
…at/suborg-scope-support
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis PR adds sub-organization scope support to user tokens and machine identity authentication. Users can now scope their session to specific sub-organizations, and machine identities can authenticate with a Key Changes:
Critical Issues Found:
Security Concerns:
Confidence Score: 1/5
Important Files ChangedFile Analysis
|
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.
71 files reviewed, 4 comments
backend/src/db/migrations/20251127192155_adds-scope-org-id-to-identity-access-tokens.ts
Outdated
Show resolved
Hide resolved
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.
Three thoughts on UX:
-
with the current UI as is we could always show the "Add Sub-Organization" button, even if you're in a sub-org, and from that modal, before firing off the mutation, if you are not in the root-org we do a token exchange and then call the mutation. That way the create sub-org experience is always accessible
-
I'm thinking we should make the token exchange based off the orgId in the url, automatically triggering when changing pages so that way back button and links always get the appropriate scope access token
-
On project access control, settings and audit logs, can you update the "Are you looking for organization _____?" to say sub-org if in a sub-org project and also add these back links to sub-organization access control, settings and audit logs to bring you to the parent org? (These should not show on the root org)
…at/suborg-scope-support
…cal/infisical into feat/suborg-scope-support
backend/src/db/migrations/20251127192155_adds-scope-org-id-to-identity-access-tokens.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-access-token/identity-access-token-service.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-alicloud-auth/identity-alicloud-auth-service.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-aws-auth/identity-aws-auth-service.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-azure-auth/identity-azure-auth-service.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-tls-cert-auth/identity-tls-cert-auth-service.ts
Outdated
Show resolved
Hide resolved
…at/suborg-scope-support
backend/src/db/migrations/20251127192155_adds-scope-org-id-to-identity-access-tokens.ts
Outdated
Show resolved
Hide resolved
backend/src/services/identity-oidc-auth/identity-oidc-auth-service.ts
Outdated
Show resolved
Hide resolved
scott-ray-wilson
left a comment
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.
couple of comments
…cal/infisical into feat/suborg-scope-support
…at/suborg-scope-support
All good from private conversation
Description 📣
scopeOrgIdcolumn to theIdentityAccessTokentablesubOrganizationNameto the machine identity auth endpointsType ✨
Tests 🛠️
subOrganizationId, please verify this on jwt.io# Here's some code block to paste some code snippets