Skip to content

Commit

Permalink
fix(authz): use internalClientId as a key when deleting a client
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Aug 11, 2024
1 parent 4b50342 commit 130d834
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class SubjectReferentialService(
"""
DELETE FROM subject_referential
WHERE subject_id = :subject_id
OR jsonb_path_match(subject_info, 'exists($.value.id ? (@ == ${'$'}value))', '{ "value": "$sub" }')
OR jsonb_path_match(subject_info, 'exists($.value.internalClientId ? (@ == ${'$'}value))', '{ "value": "$sub" }')
""".trimIndent()
)
.bind("subject_id", sub)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ internal fun getSubjectInfoForGroup(name: String): Json =
internal fun getSubjectInfoForClient(clientId: String, kcId: String): Json =
Json.of(
"""
{ "type": "Property", "value": { "clientId": "$clientId", "id": "$kcId" } }
{ "type": "Property", "value": { "clientId": "$clientId", "internalClientId": "$kcId" } }
""".trimIndent()
)

0 comments on commit 130d834

Please sign in to comment.