|
| 1 | +# Manage SCIM Provisioning (Beta) |
| 2 | + |
| 3 | +This topic describes how to configure SCIM (System for Cross-domain Identity Management) v2.0 provisioning for the Replicated Vendor Portal. |
| 4 | + |
| 5 | +:::note |
| 6 | +SCIM provisioning is Beta. Features and availability are subject to change. |
| 7 | +::: |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +The Replicated Vendor Portal supports SCIM v2.0 for automated user provisioning and deprovisioning. With SCIM you can: |
| 12 | + |
| 13 | +- Automatically provision users from your identity provider to Replicated |
| 14 | +- Keep user information synchronized between systems |
| 15 | +- Automatically deprovision users when they leave your organization |
| 16 | +- Manage the user lifecycle through your existing identity provider |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +Before you configure SCIM, ensure that: |
| 21 | + |
| 22 | +1. SAML SSO is configured. For more information, see [Manage SAML Authentication](team-management-saml-auth). |
| 23 | +2. Your team has the SAML entitlement enabled. |
| 24 | +3. You have a Vendor Service Account token with permissions to manage team members. |
| 25 | +4. You have administrative access to your identity provider. |
| 26 | + |
| 27 | +## SCIM Endpoints |
| 28 | + |
| 29 | +Base URL: `https://api.replicated.com/vendor/scim/v2` |
| 30 | + |
| 31 | +### Discovery Endpoints |
| 32 | + |
| 33 | +- `GET /ServiceProviderConfig` — SCIM implementation capabilities |
| 34 | +- `GET /ResourceTypes` — Supported resource types (User, Group) |
| 35 | +- `GET /Schemas` — Detailed schema information |
| 36 | + |
| 37 | +### User Management Endpoints |
| 38 | + |
| 39 | +- `GET /Users` — List users with filtering and pagination |
| 40 | +- `POST /Users` — Create users |
| 41 | +- `GET /Users/{userId}` — Get a user (`userId` is the email address) |
| 42 | +- `PATCH /Users/{userId}` — Update user (deactivation only) |
| 43 | +- `PUT /Users/{userId}` — Replace user (deactivation only) |
| 44 | +- `DELETE /Users/{userId}` — Delete user |
| 45 | + |
| 46 | +### Group Endpoints |
| 47 | + |
| 48 | +- `GET /Groups` — Returns an empty list (read-only for compliance) |
| 49 | + |
| 50 | +## Unique Identifier |
| 51 | + |
| 52 | +- Primary identifier: `userName` (must be the user's email address) |
| 53 | +- Resource ID: The `id` in responses is the user's email address |
| 54 | +- Path parameter: `userId` for endpoints like `/Users/{userId}` is the user's email address |
| 55 | +- Uniqueness: Email must be unique within your Replicated team. Updating a user's email via SCIM is not supported; create a new user with the new email and deactivate the old one. |
| 56 | + |
| 57 | +:::tip |
| 58 | +Email precedence: |
| 59 | +1. If any entry in `emails[]` has `primary: true`, that value is used even if `userName` is set. |
| 60 | +2. Otherwise, if `userName` is set, it is used. |
| 61 | +3. Otherwise, if `emails[]` has values, the first `emails[0].value` is used. |
| 62 | +::: |
| 63 | + |
| 64 | +## Authentication |
| 65 | + |
| 66 | +- Scheme: OAuth 2.0 Bearer Token |
| 67 | +- Header: `Authorization: Bearer <YOUR_VENDOR_API_TOKEN>` |
| 68 | +- Token type: Replicated Vendor Service Account token scoped to your team with permissions to manage team members |
| 69 | +- Prerequisite: SAML entitlement must be enabled for SCIM access |
| 70 | + |
| 71 | +Example: |
| 72 | + |
| 73 | +```bash |
| 74 | +curl -H "Authorization: Bearer YOUR_TOKEN" \ |
| 75 | + https://api.replicated.com/vendor/scim/v2/Users |
| 76 | +``` |
| 77 | + |
| 78 | +## Identity Provider Configuration |
| 79 | + |
| 80 | +### Okta Configuration |
| 81 | + |
| 82 | +#### Step 1: Add Replicated Application |
| 83 | +1. In the Okta Admin Console, go to **Applications > Applications**. |
| 84 | +2. Create a custom SAML 2.0 application. |
| 85 | +3. Click **Add Integration**. |
| 86 | + |
| 87 | +#### Step 2: Configure SAML |
| 88 | +1. Configure SAML settings as described in [Manage SAML Authentication](team-management-saml-auth). |
| 89 | +2. Ensure SAML is working before you proceed with SCIM. |
| 90 | + |
| 91 | +#### Step 3: Enable SCIM Provisioning |
| 92 | +1. In your Okta account's Replicated application listing, go to the **Provisioning** tab. |
| 93 | +2. Click **Configure API Integration**. |
| 94 | +3. Check **Enable API integration**. |
| 95 | +4. Enter the following settings: |
| 96 | + - Base URL: `https://api.replicated.com/vendor/scim/v2` |
| 97 | + - Unique ID: email |
| 98 | + - Authentication Mode: HTTP |
| 99 | + - Supported Actions: Import Users, Push New Users, Push Profile Updates (deactivate only) |
| 100 | + - API Token: Your Replicated Vendor API token |
| 101 | + |
| 102 | +#### Step 4: Configure Provisioning Settings |
| 103 | +1. Go to **Provisioning > To App**. |
| 104 | +2. Enable the following: |
| 105 | + - Create Users |
| 106 | + - Update User Attributes |
| 107 | + - Deactivate Users |
| 108 | + |
| 109 | +#### Step 5: Attribute Mapping |
| 110 | +Configure the following attribute mappings: |
| 111 | + |
| 112 | +| Okta Attribute | Replicated Attribute | Required | Notes | |
| 113 | +| --- | --- | --- | --- | |
| 114 | +| `user.email` | `userName` | Yes | Primary identifier | |
| 115 | +| `user.email` | `emails[0].value` | Recommended | Used if marked primary; otherwise only when `userName` is missing | |
| 116 | +| `user.firstName` | `name.givenName` | Recommended | Used for display purposes | |
| 117 | +| `user.lastName` | `name.familyName` | Recommended | Used for display purposes | |
| 118 | +| `user.displayName` | `displayName` | Optional | Auto-generated if not provided | |
| 119 | + |
| 120 | +Note: Only email is strictly required. If name fields are not provided, users are created but may have incomplete profile information. Internally, Replicated stores names as `firstName` and `lastName`; these map to SCIM `name.givenName` and `name.familyName` respectively. |
| 121 | + |
| 122 | +#### Step 6: Assign Users |
| 123 | +1. Go to the **Assignments** tab. |
| 124 | +2. Assign users or groups who should have access to Replicated. |
| 125 | +3. Users are provisioned to your Replicated team automatically. |
| 126 | + |
| 127 | +## Migrating from Existing User Management |
| 128 | + |
| 129 | +### Pre-SCIM User Synchronization |
| 130 | + |
| 131 | +If your team already has users in Replicated before you enable SCIM, synchronize existing users with your identity provider. |
| 132 | + |
| 133 | +#### Option 1: Automatic User Matching (Recommended) |
| 134 | +1. Before you enable SCIM provisioning, ensure that all existing Replicated users have matching accounts in your identity provider. |
| 135 | +2. Configure SCIM as described above, but do not assign users yet. |
| 136 | +3. Test with a single user: |
| 137 | + - Assign one existing user to the Replicated app in your identity provider. |
| 138 | + - The system matches by email and returns the existing user. |
| 139 | +4. Gradually assign all existing users to complete the sync. |
| 140 | + |
| 141 | +#### Option 2: Manual User Migration |
| 142 | +If email addresses do not match exactly or users exist in other teams: |
| 143 | +1. Update email addresses in Replicated or your identity provider so that they match. |
| 144 | +2. For users existing in other Replicated teams: |
| 145 | + - Domain authorized: The system automatically migrates the existing user's email and creates a new user. |
| 146 | + - Domain not authorized: Manual intervention is required. Contact support. |
| 147 | +3. Ensure that your SAML domain authorization includes all relevant email domains. |
| 148 | + |
| 149 | +#### Verification Steps |
| 150 | +After migration, verify the setup: |
| 151 | + |
| 152 | +```bash |
| 153 | +# List all users via SCIM to confirm sync |
| 154 | +curl -H "Authorization: Bearer YOUR_TOKEN" \ |
| 155 | + https://api.replicated.com/vendor/scim/v2/Users |
| 156 | + |
| 157 | +# Check a specific user by email |
| 158 | +curl -H "Authorization: Bearer YOUR_TOKEN" \ |
| 159 | + https://api.replicated.com/vendor/scim/v2/Users/ [email protected] |
| 160 | +``` |
| 161 | + |
| 162 | +### Migration Best Practices |
| 163 | + |
| 164 | +1. Test environment first. |
| 165 | +2. Staged rollout starting with a small group of users. |
| 166 | +3. Communicate the migration timeline. |
| 167 | +4. Document the current user list and permissions before migration. |
| 168 | +5. Monitor for provisioning errors during the first few days. |
| 169 | + |
| 170 | +### Generic SCIM Provider Configuration |
| 171 | + |
| 172 | +For identity providers that support SCIM v2.0: |
| 173 | + |
| 174 | +#### Basic Settings |
| 175 | + |
| 176 | +- SCIM Base URL: `https://api.replicated.com/vendor/scim/v2` |
| 177 | +- Authentication Method: Bearer Token |
| 178 | +- Bearer Token: Your Replicated Vendor API token |
| 179 | +- SCIM Version: 2.0 |
| 180 | + |
| 181 | +#### Required Attributes |
| 182 | + |
| 183 | +Minimum required attributes (only email is strictly required): |
| 184 | + |
| 185 | +```json |
| 186 | +{ |
| 187 | + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], |
| 188 | + |
| 189 | +} |
| 190 | +``` |
| 191 | + |
| 192 | +Recommended full attribute set: |
| 193 | + |
| 194 | +```json |
| 195 | +{ |
| 196 | + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], |
| 197 | + |
| 198 | + "emails": [ |
| 199 | + { |
| 200 | + |
| 201 | + "type": "work", |
| 202 | + "primary": true |
| 203 | + } |
| 204 | + ], |
| 205 | + "name": { |
| 206 | + "givenName": "John", |
| 207 | + "familyName": "Doe" |
| 208 | + }, |
| 209 | + "active": true |
| 210 | +} |
| 211 | +``` |
| 212 | + |
| 213 | +## Supported Features |
| 214 | + |
| 215 | +### Supported Operations |
| 216 | + |
| 217 | +- User creation |
| 218 | +- User deactivation |
| 219 | +- User deletion |
| 220 | +- User filtering |
| 221 | +- Pagination |
| 222 | +- Email migration (automatic handling of email conflicts across teams) |
| 223 | + |
| 224 | +### Unsupported Operations |
| 225 | + |
| 226 | +- User reactivation |
| 227 | +- Password management |
| 228 | +- Group management (read-only, returns empty results) |
| 229 | +- Bulk operations |
| 230 | +- Updating user attributes other than deactivation |
| 231 | + |
| 232 | +## Troubleshooting |
| 233 | + |
| 234 | +### Common Issues |
| 235 | + |
| 236 | +#### Authentication errors (401) |
| 237 | + |
| 238 | +- Verify that your API token is valid and has appropriate permissions. |
| 239 | +- Ensure that the token is sent as `Authorization: Bearer YOUR_TOKEN`. |
| 240 | +- Check that your team has the SAML entitlement enabled. |
| 241 | + |
| 242 | +#### User not found errors (404) |
| 243 | + |
| 244 | +- Verify that the email address is correct. SCIM uses the email as `userId`. |
| 245 | +- Ensure that the user belongs to the correct team. |
| 246 | +- Check that SAML domain authorization is configured properly. |
| 247 | + |
| 248 | +#### Email conflicts |
| 249 | + |
| 250 | +The system automatically handles email conflicts when a user exists in any other team if your email domain is authorized for SAML. |
| 251 | + |
| 252 | +If the email domain is authorized for SAML: |
| 253 | + |
| 254 | +- The original user's email is migrated with a `+moved{date}` suffix. |
| 255 | +- A new user is created with the original email in the target team. |
| 256 | +- An email notification is sent to inform the user their account was moved. |
| 257 | +- Migration proceeds automatically. |
| 258 | + |
| 259 | +If the email domain is not authorized for SAML: |
| 260 | + |
| 261 | +- Migration is blocked for security. |
| 262 | +- The API returns the error: "Email is already associated with another team". |
| 263 | +- Manual intervention is required. Contact support or use a different email. |
| 264 | + |
| 265 | +#### Provisioning failures |
| 266 | + |
| 267 | +1. Check SCIM endpoint connectivity. |
| 268 | +2. Verify that all required attributes are being sent. |
| 269 | +3. Ensure that SAML is configured and working. |
| 270 | +4. Review identity provider logs for specific error messages. |
| 271 | + |
| 272 | +### Testing SCIM Integration |
| 273 | + |
| 274 | +#### Manual testing |
| 275 | + |
| 276 | +Use curl to test SCIM endpoints: |
| 277 | + |
| 278 | +```bash |
| 279 | +# Test service provider configuration |
| 280 | +curl -H "Authorization: Bearer YOUR_TOKEN" \ |
| 281 | + https://api.replicated.com/vendor/scim/v2/ServiceProviderConfig |
| 282 | + |
| 283 | +# List users |
| 284 | +curl -H "Authorization: Bearer YOUR_TOKEN" \ |
| 285 | + https://api.replicated.com/vendor/scim/v2/Users |
| 286 | + |
| 287 | +# Create user |
| 288 | +curl -X POST \ |
| 289 | + -H "Authorization: Bearer YOUR_TOKEN" \ |
| 290 | + -H "Content-Type: application/scim+json" \ |
| 291 | + -d '{ |
| 292 | + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], |
| 293 | + |
| 294 | + "emails": [{"value": "[email protected]", "primary": true}], |
| 295 | + "name": {"givenName": "Test", "familyName": "User"}, |
| 296 | + "active": true |
| 297 | + }' \ |
| 298 | + https://api.replicated.com/vendor/scim/v2/Users |
| 299 | +``` |
| 300 | + |
| 301 | +#### Identity provider testing |
| 302 | + |
| 303 | +1. Test the connection using your identity provider's test feature. |
| 304 | +2. Provision a test user and verify creation. |
| 305 | +3. Deprovision the test user and verify deactivation. |
| 306 | +4. Review both identity provider and Replicated audit logs. |
| 307 | + |
| 308 | + |
0 commit comments