Add support for Okta as SCIM provider
Fixes
What does this MR do?
Makes minor adjustments to SCIM to support Okta. There are some slight differences between Azure and Okta's payloads.
With these changes, GitLab passes the Okta Runscope tests - both the spec and the CRUD tests.
- Spec https://www.runscope.com/radar/s7xry85wa7w1/8f64ade4-9e9a-4590-a826-9330d716c18e/history/2305a919-620a-410d-94db-339e4c306a18
- CRUD https://www.runscope.com/radar/s7xry85wa7w1/01b19e2e-eee2-4e40-ace4-22d54e3c755f/history/57539f56-b40e-47b1-b7a8-d0432a3da514
Any remaining failures in the above tests are just because the test was not as dynamic as Okta itself. Some places where Okta allows an option, the tests are static. This isn't a problem.
The Okta and Azure payloads different when removing/deactivating a user. Namely, Azure uses the path
key while Okta does not. RFC7644 Section 3.5.2 "Modifying with PATCH" indicates that path
is optional for 'add' and 'replace' operations. So both are compliant with the spec it seems. Here are examples:
Azure:
{
"Operations": [
{
"op": "Replace",
"path": "active",
"value": false
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}
Okta:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{
"op": "replace",
"value": {
"active": false
}
}]
}
Screenshots
Okta Name ID format and username
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team