-
Notifications
You must be signed in to change notification settings - Fork 579
feat: hydate req.account in jwt middleware #15599
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
base: main
Are you sure you want to change the base?
feat: hydate req.account in jwt middleware #15599
Conversation
Your preview environment pr-15599 has been deployed. Preview environment endpoints are available at: |
afc7dee
to
f33afe3
Compare
ac5cf1a
to
4379259
Compare
f33afe3
to
ecf1626
Compare
4379259
to
06fb723
Compare
06fb723
to
1595910
Compare
ecf1626
to
1fa0e9c
Compare
1595910
to
9ca98b4
Compare
1fa0e9c
to
ddee6c0
Compare
ddee6c0
to
6ae2916
Compare
6ae2916
to
db89c2b
Compare
9ca98b4
to
ab311e0
Compare
packages/backend/src/middlewares/jwtAuthMiddleware/hydrateEmbeddedAccount.ts
Outdated
Show resolved
Hide resolved
e6a50d3
to
7faa72d
Compare
4893686
to
0c54e9f
Compare
0c54e9f
to
0cd02b2
Compare
7faa72d
to
a4c898e
Compare
0cd02b2
to
9c1b7a4
Compare
9c1b7a4
to
e871c41
Compare
e871c41
to
830e4f0
Compare
packages/backend/src/middlewares/jwtAuthMiddleware/hydrateEmbeddedAccount.ts
Outdated
Show resolved
Hide resolved
830e4f0
to
c5b8030
Compare
packages/backend/src/middlewares/jwtAuthMiddleware/hydrateEmbeddedAccount.ts
Show resolved
Hide resolved
c5b8030
to
8840ddf
Compare
organizationUuid: mockOrganizationUuid, | ||
}; |
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.
The mockOrganization
object is missing the name
property which is required by the hydrateEmbeddedAccount
function. Please add name: 'Test Organization'
to match the function's expected input type of Pick<Organization, 'organizationUuid' | 'name'>
.
organizationUuid: mockOrganizationUuid, | |
}; | |
organizationUuid: mockOrganizationUuid, | |
name: 'Test Organization', | |
}; |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
8840ddf
to
ab2c272
Compare
Preview environment logs can be accessed at: https://console.cloud.google.com/logs/query;query=resource.labels.namespace_name%3D%22pr-15599%22;duration=PT30M?project=lightdash-previews |
ab2c272
to
3022bf4
Compare
Preview environment logs can be accessed at: https://console.cloud.google.com/logs/query;query=resource.labels.namespace_name%3D%22pr-15599%22;duration=PT30M?project=lightdash-previews |
Closes: #15580
Description:
Refactors the JWT authentication middleware to improve embedded dashboard functionality. This PR:
hydrateEmbeddedAccount
utility to properly populate user session data and abilitiesEmbedJwt
withCreateEmbedJwt
type in relevant places due to zod and tsoa not being on friendly termsThis change improves the security model for embedded dashboards by properly scoping user permissions based on the JWT token contents.