-
Notifications
You must be signed in to change notification settings - Fork 3
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 keycloak UUIDs as user identifiers - take 2 #118
Conversation
Code Coverage Report
|
e53a271
to
3c0853d
Compare
d93bee0
to
fd75f04
Compare
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.
One minor thing, besides that LGTM
await queryRunner.query( | ||
`ALTER TABLE "findings" ALTER COLUMN "resolver" SET DATA TYPE uuid | ||
USING CASE | ||
WHEN "resolver" IN ('SYSTEM_ACTOR', 'Yaku', 'Aqua') THEN '00000000-0000-0000-0000-000000000000'::uuid | ||
ELSE "resolver"::uuid | ||
END`, | ||
) |
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.
That's exactly what I meant, nice job :)
@@ -21,9 +21,9 @@ import { SYSTEM_REQUEST_USER } from '../module.utils' | |||
|
|||
const CACHE_TIMEOUT = 1000 * 60 * 5 // 5 minutes | |||
export const SYSTEM_USER = new UserInNamespaceDto() | |||
SYSTEM_USER.id = 'SYSTEM_ACTOR' | |||
SYSTEM_USER.id = '00000000-0000-0000-0000-000000000000' |
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.
I think we can remove this user now as well.
As you replaced the other entries it should be not used anymore.
Just to prevent having two possibilities to use and to update.
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.
I cleaned-up any SYSTEM_USER
references, only SYSTEM_REQUEST_USER
is used now
This PR enforces the usage of keycloak UUIDs.