SCIM
SCIM 2.0 is an open standard for managing accounts and groups. Through SCIM, Nova manages accounts and group memberships in applications that offer a SCIM 2.0 interface. This includes SAP Cloud Identity Services: through its groups, Nova controls which role collections identities receive in SAP BTP – see SAP Cloud Identity Services.
Profile
Every SCIM target system has one of two profiles under “Profile”. It determines how Nova talks to the server:
| “Generic (SCIM 2.0)” | “SAP Cloud Identity Services” | |
|---|---|---|
| SCIM path | /scim/v2 | /scim |
| Authentication | “None”, “Basic”, “Bearer”, OAuth or certificate | OAuth or certificate (recommended) |
| Reading page by page | startIndex and count | cursor with startId and nextId |
| Creating accounts | yes, can be switched off | no – existing accounts are linked |
| Address | http or https | https only |
The default is “Generic (SCIM 2.0)”. Target systems created before the profiles were introduced keep working with it unchanged.
Connection
- “Base URL”: Nova appends the profile's SCIM path itself, for example
/scim/v2/Users. If the endpoints are located underhttps://app.example.com/api/scim/v2/, the base URL ishttps://app.example.com/api. A different path is entered under “Advanced” → “SCIM path”. - “Auth type”:
- “None”
- “Basic” with “User” and “Password”
- “Bearer” with a fixed token
- “OAuth (Client Credentials)” with “Client ID” and “Client secret”. Nova uses them to fetch a token from the token endpoint and reuses it until shortly before it expires. There, Nova authenticates by HTTP Basic for a generic server (
client_secret_basic), and with client ID and secret in the form for SAP Cloud Identity Services (client_secret_post). For a generic server, the “Token URL” is mandatory. For SAP Cloud Identity Services it is under “Advanced”; if it is left empty, Nova uses‹base URL›/oauth2/token. - “Certificate (X.509)” with “Private key (PEM)” and “Certificate (PEM)”. Nova identifies itself with the certificate on every connection (mTLS) and needs no token. The key must be unencrypted – RSA with at least 2048 bits, or EC – and the certificate may contain a chain. When saving, Nova checks that key and certificate belong together – also when only a new certificate is entered for the stored key.
- “Last-logon attribute (SCIM)” under “Advanced”, see Last logon.
Nova stores the password, token, client secret and private key encrypted.
If the server rejects an OAuth token, Nova fetches a new one once and repeats the request. If the token endpoint itself rejects the credentials, Nova asks again with the same credentials only after five minutes: SAP Cloud Identity Services locks a client ID after several failed attempts. Nova uses a newly entered client secret at once.
“Check status” retrieves ServiceProviderConfig. Some servers answer this endpoint without authentication too; if authentication is set up, Nova therefore also reads one account with authentication (/Users?count=1). If the server does not know ServiceProviderConfig, Nova reads only the account; for SAP Cloud Identity Services, Nova reads one account straight away. If the server rejects the authentication, the target system counts as offline.
Accounts
| Action | SCIM call |
|---|---|
| Search | GET /Users with filter userName eq "…", otherwise GET /Users/{id} |
| Create | POST /Users |
| Change | PATCH /Users/{id}, operation replace |
| Set password | PATCH on the password attribute |
| Lock, unlock | PATCH on the active attribute; for SAP Cloud Identity Services also on the account's SAP status |
| Delete | DELETE /Users/{id} |
Nova finds an account by the account ID under which it is linked: first as userName, then as the account's SCIM ID. Nova does not search by email address. If the server answers with an error – for example because it rejects the authentication, throttles or is disrupted – Nova reports that error. The account ID then does not count as free.
When creating an account, Nova sends userName (the account ID), displayName, name with first and last name taken from the identity's name, active, the email address as the primary address and, if present, the password. Further simple attributes follow the “Mapping”.
With the “Generic (SCIM 2.0)” profile, creating accounts can be switched off in the connection with “Create accounts”. With the “SAP Cloud Identity Services” profile, Nova creates no accounts; the setting does not exist there. Without account creation, Nova refuses every creation with a message, in provisioning runs too, and sends no request to the server; when an account is added to an identity, Nova only offers linking. Existing accounts are linked instead.
Linking existing accounts
“Import users” on the target system links accounts that already exist in the SCIM server to identities in Nova. The same import is available as a job of type “Import SCIM accounts”, on a schedule too – see Monitoring and jobs.
- Matching: with “E-mail address” (the default), Nova compares the account's email addresses, the primary one first, with the identity's email address. With “userName (= the identity's e-mail address)”, Nova compares the account's
userNamewith the identity's email address – for servers whoseuserNameis an email address. If exactly one identity matches, Nova links the account; if none or several match, it stays unlinked. - Account ID: Nova links the account under its SCIM ID.
- Accounts already linked are not linked again, only counted. Their memberships are taken over like those of the other accounts (see “Group memberships”); a repeated import thus adds memberships in groups that were imported since the last run or were added in the SCIM server. If an identity already has another account in this target system, the import reports an error for the new account.
- Inactive accounts are left out as long as “Active users only” is switched on – which is the default.
- Group memberships are taken over as direct assignments with “Take group memberships over” (the default), for groups already imported as entitlements. So import the groups first. If the identity already holds the entitlement, for example through a business role, Nova does not add a second assignment. The import only adds: it does not remove an assignment whose membership is missing in the SCIM server; reconciliation shows such deviations.
- New identities are created only with the “Generic (SCIM 2.0)” profile, and only with “Create missing identities” in “Import users”; never with SAP Cloud Identity Services.
After the run, “Import users” reports how many accounts were linked and how many were already linked. Below, the dialog also shows how many accounts could not be matched to an identity (“without a matching identity”), how many it left out as inactive, how many assignments are new and how many accounts the import read in total. With “Create missing identities”, it also names the newly created identities; their accounts count as linked as well. If linking individual accounts fails, the dialog lists the errors per account. A job of type “Import SCIM accounts” records the same counts in the result of its run. If Nova cannot read the accounts completely, the import changes nothing.
Groups
A job of type “Import SCIM groups” takes over the group catalogue. It reads the groups page by page; if a page cannot be read, the run fails rather than taking over an incomplete catalogue. An entitlement carries the group's display name (displayName); in addition, Nova stores the group's ID.
Nova changes memberships with a PATCH on the group (/Groups/{id}); the other members remain untouched. As the member value, Nova passes the account's SCIM ID, which it first determines from the account ID.
- Add: operation
addonmembers. - Remove: operation
removewith the filtermembers[value eq "…"]. Nova never sends aremovewithout a filter, because under the SCIM standard it removes all members of the group. If a generic server also lists the account under its account ID as a member, Nova removes both values.
During provisioning, Nova finds the group by the stored ID, otherwise by the display name; Nova remembers a match by name as the ID. If a group is renamed in the SCIM server, Nova therefore still finds it. Importing again with “Overwrite existing roles” updates the entitlement's name in Nova.
For SAP Cloud Identity Services, Nova searches by display name only when adding or when no ID is stored for the entitlement. Otherwise, when removing, only the stored ID counts: if it is not among the account's groups, there is nothing for Nova to remove, and Nova writes nothing – not even if the account is a member of a group with the same name and a different ID, for example after the group was deleted and created again.
Before writing, Nova reads the current memberships – for a generic server the group's members, for SAP Cloud Identity Services the account's groups, once per account. If the account is already a member, or no longer one, Nova does not write. This way the change journal contains only effective changes. For reconciliation, Nova reads an account's groups and maps them to the entitlements by the stored ID.
Last logon
SCIM has no standard attribute for the last logon. Nova reads the attribute entered under “Last-logon attribute (SCIM)” – a path with dots is possible, as is an attribute of an extension schema with its URN in front, for example urn:ietf:params:scim:schemas:extension:sap:2.0:User:loginTime. If none is entered or it returns no value, Nova checks lastLogin, lastLogon, lastLoginTime and loginTime, and finally loginTime of the SAP extension.
What differs between SCIM servers
SCIM leaves vendors some room. Before going live, it should be clear:
- under which path the endpoints sit – the default is
/scim/v2, a different path can be entered under “Advanced” - which authentication the server requires – Nova supports Basic, bearer tokens, OAuth with client credentials and client certificates
- whether the server accepts an account's SCIM ID as a member value and supports
removewith the filtermembers[value eq "…"] - whether the server supports the filters
eq(foruserNameanddisplayName) andco(group search) - whether
PATCHis supported for accounts (/Users) and groups and whetherpasswordandactivecan be written with it - whether, and under which name, the last logon is provided
A run-through with a test account – create, grant and revoke a group, lock, delete – shows whether a server fits these assumptions.
SAP Cloud Identity Services
SAP Cloud Identity Services – with Identity Authentication, often called IAS – is the identity provider of SAP BTP. With the “SAP Cloud Identity Services” profile, Nova controls which role collections identities receive in SAP BTP. In BTP, each role collection is mapped once to a group from SAP Cloud Identity Services; after that, Nova only maintains the memberships in these groups. For this, Nova uses the SCIM interface of the tenant's Identity Directory.
The way there:
- In SAP Cloud Identity Services, create access for Nova.
- In Nova, create the target system, import the groups and link the existing accounts.
- In SAP BTP, map the role collections to the groups.
Access for Nova
Nova signs in as a technical administrator. In the administration console of SAP Cloud Identity Services, create an administrator under “Administrators” → “Add” → “System”; its name cannot be changed later. It needs the permissions “Manage Users”, “Manage Groups” and “Read Users”. It can sign in in two ways:
Secret – for “OAuth (Client Credentials)”: SAP Cloud Identity Services generates the client ID itself. The console shows a secret only once, and depending on the choice it expires after one or two years or never. An administrator can have two secrets, so a new one can be entered in Nova before the old one expires. The “Token URL” stays empty in Nova.
Certificate – for “Certificate (X.509)”: SAP Cloud Identity Services can generate a certificate and delivers it as a
.p12file with a password. Nova needs the key and the certificate separately in PEM format:bashopenssl pkcs12 -in nova.p12 -nocerts -nodes -out nova-key.pem openssl pkcs12 -in nova.p12 -nokeys -out nova-cert.pemEnter the content of
nova-key.pemunder “Private key (PEM)” and that ofnova-cert.pemunder “Certificate (PEM)”, then deletenova-key.pem– the file contains the key unencrypted. If OpenSSL 3 reports an unsupported algorithm, the-legacyoption helps.
SAP has deprecated “Basic” sign-in for this interface.
Target system in Nova
- “Profile”: “SAP Cloud Identity Services”.
- “Base URL”: the tenant's address, for example
https://mytenant.accounts.ondemand.com, likewise underaccounts.cloud.sapor a custom domain. If the address entered ends in/scim,/scim/v2or/service/scim, Nova cuts this off when saving; ifhttps://is missing, Nova adds it. Nova rejects unencryptedhttp. - “Auth type”: “OAuth (Client Credentials)” or “Certificate (X.509)”.
- “Last-logon attribute (SCIM)” under “Advanced”:
urn:ietf:params:scim:schemas:extension:sap:2.0:User:loginTime.
“Check status” then reads one account of the tenant, which confirms the address, the authentication and the read permission.
Link accounts instead of creating them
In SAP Cloud Identity Services, most employees already have an account, for example from SAP Identity Provisioning or from a connected HR system. If Nova created accounts itself, a second account jdoe2 would appear next to an existing account jdoe. That is why Nova creates no accounts with this profile and links the existing ones instead:
- Take over the groups with a job of type “Import SCIM groups”.
- “Import users” on the target system: Nova links the accounts by email address and takes over their memberships in the imported groups, see Linking existing accounts.
Nova links an account under its SCIM ID, a UUID; it fits the “SCIM Default” ruleset. Anyone who links an account by hand with a userName in the form of an email address needs an “Account ID ruleset” that allows @: apart from letters and digits, “SCIM Default” only allows _, - and ..
In future, Nova also creates accounts in SAP Cloud Identity Services and maintains their SAP-specific attributes. planned
Technical name of a group
A group in SAP Cloud Identity Services has a display name (displayName) and a technical name (name in the extension urn:sap:cloud:scim:schemas:extension:custom:2.0:Group). Nova names the entitlement after the display name. “Browse groups” on the target system shows the technical name; if it differs from the display name, it also appears in the entitlement's description. SAP BTP maps role collections by the technical name.
Nova marks authorization groups of SAP Cloud Identity Services and application groups that can only be read as read-only. The import does not take them over; if Nova already has an entitlement for such a group, for example from reconciliation, the import marks it as “System group · read-only”. Nova does not change their members – on an identity's account, such a group shows this note and cannot be removed. Ordinary user groups are suitable for role collections.
Setting up SAP BTP
In the SAP BTP subaccount:
- Under “Security” → “Trust Configuration”, use “Establish Trust” to trust the SAP Cloud Identity Services tenant. SAP Cloud Identity Services creates an application for the subaccount; its
groupsattribute passes a user's groups on to BTP. - Under “Security” → “Role Collections”, open the role collection, choose “Edit” and, in the “User Groups” section, enter the identity provider and the group's technical name. BTP distinguishes upper and lower case and does not check the name – a typo only shows when the role collection is missing.
If a corporate identity provider is connected to SAP Cloud Identity Services, the subaccount's application needs identity federation with “Use Identity Authentication user store”. Otherwise SAP Cloud Identity Services passes on the corporate identity provider's attributes unchanged, and the groups Nova maintains do not reach BTP.
BTP creates the users in BTP (shadow users) itself at their first sign-in, as long as “Create Shadow Users on User Logon” is switched on – which is the default. Nova creates nothing in BTP.
BTP evaluates the groups at sign-in. A newly granted or revoked role collection therefore usually takes effect only with the next sign-in or the next token; running sessions keep their rights until then.
A test with one identity – grant a group, sign in again, check the role collection, revoke the group – shows whether the mapping works.
Throttling
SAP Cloud Identity Services answers 200 SCIM requests per minute per tenant. The tenant delays further requests and, from the 281st on, rejects them for 60 seconds. The limit applies to the whole tenant, so SAP Identity Provisioning and other applications count too.
Nova limits its own requests to a tenant to about 150 per minute and waits briefly for this. If the tenant rejects requests nevertheless, Nova reports the throttling in dialogs and in “Check status” at once instead of waiting long; then try again after one minute. Jobs wait out the minute themselves. Large imports take longer because of the throttling.