Skip to main content
Version: v46

Integrating PrivX with SCIM

System for Cross-domain Identity Management (SCIM) is a protocol for automating the exchange of user information between identity domains and IT systems. PrivX supports SCIM 2.0 for importing both user and host data. For cloud hosts, you can use the corresponding PrivX host-directory integration. SCIM provides another option for importing hosts, including hosts in on-premises environments.

PrivX supports the following SCIM 2.0 operations:

  • Create
  • Read
  • Replace
  • Delete
  • Search, with the eq filter only

The following are not supported:

  • Patch and Bulk operations
  • The Group resource type

Supported authentication types:

  • Basic credential authentication
  • OAuth 2.0 authentication with grant_type=client_credentials
  • Access token authentication

Preparing SCIM Access​

The following procedure uses API client authentication with OAuth 2.0.

  1. Go to Administration → Roles and add a new role for SCIM access and grant it the sources-data-push permission.

    [Optional] To limit access to the SCIM endpoint, enable Restrictions under Contextual Restrictions and configure additional restrictions for the role.

  2. Go to Deployment → API Clients to create an API client and assign the created role to it. Use this API client's credentials when configuring OAuth 2.0 authentication in your SCIM client.

Configuring SCIM Directory​

You can configure multiple SCIM directories, for example, to import hosts from different sources.

To create a new directory, go to Administration → Directories and click Add Directory:

  1. Under Directory Name and Type, enter a unique name and select SCIM from the Type drop-down menu. The SCIM directory settings appear.

  2. Under SCIM Settings, configure the following:

    • SCIM Authentication Method: Select API Client to use OAuth 2.0 authentication with the API client created earlier.

    • Create roles: Enable to automatically create missing roles for hosts imported through SCIM. Disable to manage roles manually.

      • Automatically created roles include a one-to-one mapping rule between the role name and the user's group name. PrivX periodically deletes roles created by SCIM that are not used by any host.
      • To configure how often this cleanup runs, go to Administration → Settings → Role Store and set SCIM Role Cleanup Interval (Minutes). Changes apply when you save the settings, without restarting PrivX. Set the interval to 0 to disable this cleanup task. For information about how interval changes affect task execution, see Configuring Housekeeping Tasks.
    • [Optional] Update SSH host keys: Enable to allow SCIM to update SSH host keys.

  3. Under OpenID Connect Settings enable OpenID Connect, if you need to allow imported users to log in to PrivX with OIDC. Configure the settings for your OIDC provider.

    important

    Enabling OpenID Connect disables other authentication methods for user login to this directory.

    For a SCIM user to log in successfully, the OIDC provider's UserInfo endpoint or ID token must return the subject sub value that matches the imported user's externalId. If externalId is not defined, PrivX uses userName instead. To use a different attribute for matching, configure Attribute Mapping under Advanced Directory Settings as described below.

  4. Expand Advanced Directory Settings to configure the remaining settings:

    1. [Optional] Under Advanced SCIM Settings, enter a filter in SCIM User Filter to make only matching imported users available in PrivX. Use LDAP filter syntax. For example:

      (&(mail=*@example.com)(memberof=privx-users))

      This example matches users whose email address ends in @example.com and whose group memberships include privx-users. Supported filter properties are distinguishedname, dn, sub, userprincipalname, cn, preferred_username, unixaccount, name, external_id, mail, samaccountname, windowsaccount, memberof, and id.

    2. [Optional] Under Required IdToken Attributes, specify attributes that the OIDC user's ID token must contain. PrivX rejects authentication if the ID token does not satisfy the configured requirements. Enter one name=value pair per line in Key=Value Attribute Pairs. To allow multiple values for an attribute, separate the values with commas. For example:

      email_verified=true
    3. [Optional] Under Attribute Mapping, map directory user attributes to PrivX user attributes. Enter one source=target mapping per line in Source=Target Attribute Pairs. To map a source attribute to multiple target attributes, separate the targets with commas. For example, to use the user's email address as the account name for SSH and RDP directory logins:

      mail=unix_account,windows_account

      To use the SCIM mail attribute for matching the OIDC subject, enter:

      mail=external_id

      The resulting external_id value must be unique within the SCIM directory. Available target attributes include principal, windows_account, unix_account, full_name, email, telephone, company, department, job_title, external_id, and comment. You can also create custom target attributes.

    4. Under Session Password Settings, enable Session Password if users need to log in with a session password, for example, when using a native client that cannot open a browser for OIDC login.

    5. Under Directory Options, use Status to enable or disable the directory. Disabling the directory signs out all users who are currently logged in through it.

  5. Save the directory. The PrivX Web UI displays the SCIM API endpoint and OAuth token endpoint. Use these endpoints to configure your SCIM client below.

Configuring SCIM Client​

Configure the external application that sends user or host data to PrivX:

  1. After saving the SCIM directory in PrivX, copy the SCIM API endpoint and OAuth token endpoint displayed for that directory. In your external application's SCIM provisioning settings, enter these URLs in the corresponding fields.

    2402

  2. Configure OAuth 2.0 authentication with grant_type=client_credentials. Use the credentials of the PrivX API client created in Preparing SCIM Access.

  3. Configure attribute mappings in your SCIM client for the user or host attributes listed under Supported Attributes.

  4. Follow the application's instructions for starting provisioning. Import users or hosts and verify that their attributes are mapped correctly in PrivX. If necessary, adjust the mappings in your SCIM client or the PrivX directory settings.

Supported Attributes​

Configure your SCIM client to map source data to the following user and host attributes.

User Attributes​

User object schema: urn:ietf:params:scim:schemas:core:2.0:User

AttributeTypeDescriptionExample
userNamestring (required)User principal. Usually the same as unix_username.johndoe
windowsSidstring (optional)Windows security identifier in string format.S-1-5-21-992878714-4041223874-2616370337-1001
externalIdstring (optional)Identity management (IDM) identifier (_id) for the user object. Must be unique within the SCIM directory. If omitted, userName is used as the unique identifier. By default, the OIDC sub value must match this identifier for login.5c6598fe-608f-4121-b023-6bd1d293270e
displayNamestring (optional)User's full name. Used in connection logs and the PrivX Web UI.John Doe
mailstring (optional)User's email address.john@doe.com
titlestring (optional)Comma-separated list of the user's group memberships. Equivalent to the Active Directory memberOf attribute. Used when groups has no values.developers,db-admin,adminrole1
groupsarray of strings (optional)List of the user's group memberships. Equivalent to the Active Directory memberOf attribute. Used by default.["developers","db-admin","adminrole1"]
tip

Multi-value attributes are supported only for user group memberships. If your SCIM client does not support multi-value attributes, use title instead of groups.

Host Attributes​

Custom host object schema: urn:ietf:params:scim:schemas:ssh:2.0:Host

AttributeTypeDescriptionExample
externalIdstring (required)IDM identifier id for the host object. Must be unique within the SCIM directory.ff558e65-cc83-5edb-6de7-c8cf6e2c8098
commonNamestring (required)Host name displayed in host lists.Web server dev-1
contactAddressstring (required)Host connection address: a domain name or IP address.targethost.test.internal
descriptionstring (optional)Host description visible to PrivX administrators.Development web server.
userMessagestring (optional)Host description visible to end users.Web server, RHEL 8.
tagsstring (optional)Comma-separated list of host tags. Useful for auditing.env=prod,cluster=123,test tag
accessGroupIdstring (optional)PrivX access group ID. Use an empty value for the default access group. For more information, see Access Groups.c3ce0d74-c528-480d-8d5e-598f705484a5
SSHHostPublicKeysstring (optional)Comma-separated list of known host public keys for new servers. Use this attribute to pre-populate new hosts with valid SSH host keys.ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPr3ouRuMvGtOO13TvNVi/3k4JTvYQWITiChnWGgTs0ER2nOv0JMk+wkQzn1ZoMlnAkd2z8C/aHyP70x7XAedVo=
tofuboolean (optional)Trust on first use. If false, an administrator must accept all missing and changed host keys for new SSH connections. If true, any user can accept the key once.true
auditEnabledboolean (optional)Enables or disables session recording for the host.true
servicesstring (optional)Comma-separated list of services to enable for the host. Supports SSH, RDP, WEB, and VNC.SSH:22,RDP:3389,VNC:5900
principalsstring (optional)List of host principals that define role access for directory logins and shared user accounts. If Create roles is enabled in the SCIM directory settings, PrivX automatically creates missing roles referenced by imported hosts. The SCIM connector cannot automatically assign system roles, such as privx-admin, to hosts. To grant administrative permissions for SCIM hosts, create a separate role for this purpose.developers:root=adminrole1,adminrole2:directoryrole1:directoryrole2
organizationstring (optional)Customer-defined organization for the host.ACME Inc.
organizationalUnitstring (optional)Customer-defined organizational unit for the host.Human Resources
zonestring (optional)Customer-defined zone for the host.us-east-1a
hostTypestring (optional)Customer-defined host type.Linux RHEL8
classificationstring (optional)Customer-defined host classification.prod