Skip to content

Commit 950d793

Browse files
Add explanation for saml/scim provisioning
Signed-off-by: Veljko Maksimovic <[email protected]>
1 parent 71ddd94 commit 950d793

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ee/rbac/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,24 @@ erDiagram
299299
string name
300300
}
301301
```
302+
303+
## Provisioning SCIM/SAML JIT Users
304+
305+
### SCIM Provisioning
306+
307+
When we receive a SCIM request, we first validate that the signature is correct. Once validated, we create an `okta_user` entity in the database (note: this is an outdated name that predates our support for multiple identity providers), or update an existing `okta_user` if one already exists. The user is placed in a pending state.
308+
309+
A SCIM provisioner async worker then processes these pending `okta_user` entities. Based on the payload of the SCIM request (which is stored as part of the `okta_user` database entity), the worker performs one of three actions:
310+
- Creates a new user and adds them to the organization
311+
- Updates an existing user
312+
- Deactivates a user and removes them from the organization
313+
314+
### SAML JIT Provisioning
315+
316+
When we receive a SAML request, we check if an `okta_user` (SCIM user) already exists for that user. If no SCIM user exists, we return a 404 error, unless the organization has SAML JIT (Just-In-Time) provisioning enabled.
317+
318+
If SAML JIT provisioning is enabled and this is the user's first SAML request, we create a `saml_jit_user` entity. The SAML JIT provisioner picks this up immediately and creates a proper Semaphore user.
319+
320+
### Known Limitation
321+
322+
The SAML JIT provisioning implementation has a limitation that should be addressed. Even though the structure of the `saml_jit_user` entity is designed to work with async workers, those workers were never implemented. The current implementation processes SAML JIT users synchronously during the request. If there is no available database connection at the time of the SAML request, the request will fail, and the SAML JIT user will not be processed again. This differs from the SCIM provisioning flow, which properly handles retries through the async worker pattern.

0 commit comments

Comments
 (0)