-
Story
-
Resolution: Unresolved
-
Normal
-
None
-
Product / Portfolio Work
-
False
-
-
False
-
None
-
Unset
-
None
-
-
-
-
A&M Tech Debt Sprint Q3 2025, Access & Management Sprint 115, Access & Management Sprint 116, Access & Management Sprint 117, Access & Management Sprint 118
Once the token is updated, db listen and notify the endpoints about the token is ready, and let the endpoints return the updated token
This refers to this solution: https://docs.google.com/document/d/10_CiuaUxkMhNl0kks6Zz9BHS8GFDq7ZnSePcOXx4jVc/edit?tab=t.0#bookmark=id.2342cubplyfv
This is requires changes in workspace creation*(RBAC API)* action and in RBAC Kafka consumer.
Algorithm:
- Write to model & outbox (w/ some request ID) (RBAC API)
- SQL LISTEN for corresponding NOTIFY to come for that request ID (RBAC API)
- [concurrently]
- RBAC Kafka consumer IN RBAC picks this up from topic(debezium+outbox)
- RBAC writes this to Relations and in that response gets a ktn(RBAC Kafka consumer)
- RBAC then writes the ktn for the org (tenant) for this update and NOTIFY-ies the db with that request ID (RBAC Kafka consumer)
- Request picks up the NOTIFY, and responds to the user (RBAC API)
Change for RBAC API
Point 1. is existing part, point 2. and 4 is needed in RBAC API.
RBAC API request goes through layers: View -> Serializer -> Service -> ORM
For this case workspace creation action starts in workspace view : https://github.com/RedHatInsights/insights-rbac/blob/4b7077b31c20fc3a96a653d714714fca725ae450/rbac/management/workspace/view.py#L84
This calls workspace serializer create workspace method
which call create on workspace service where can be changes done:
PSQL listen query needs to be added after outbox message is created & committed (Point 2.)
Example of Django code:
as RBAC Kafka consumer is not ready, this can be tested with psql command.
by calling "NOTIFY ... "
This is code needs to be added under feature flags (RBAC has supported) in order to merge it separately.
RBAC Kafka consumer
- point 3, ** Kafka consumer is not available at this moment.
1.
|
Add LISTEN to API for workspace creation |
|
Code Review | |
Abhishek Koserwal |
2.
|
Add Notify Part to RBAC kafka consumer |
|
Refinement | |
Unassigned |