diff --git a/manifest.json b/manifest.json index df2916b4..0a4e219f 100644 --- a/manifest.json +++ b/manifest.json @@ -242,6 +242,10 @@ "title": "Okta UID GID Sync Guide", "path": "/ssh/okta-gid-uid.mdx" }, + { + "title": "Entra ID UID GID Sync Guide", + "path": "/ssh/entra-id-gid-uid.mdx" + }, { "hideFromSidebar": true, "title": "Step by Step Guide", diff --git a/ssh/azure-ad.mdx b/ssh/azure-ad.mdx index f35303ff..6958111e 100644 --- a/ssh/azure-ad.mdx +++ b/ssh/azure-ad.mdx @@ -1,5 +1,5 @@ --- -updated_at: February 03, 2026 +updated_at: December 01, 2026 title: Microsoft Entra ID Quickstart html_title: SSH with Microsoft Entra ID (Azure AD) description: Integrate SSH certificates with Microsoft Entra ID. Enable single sign-on for SSH using enterprise identity providers for unified access. @@ -147,4 +147,6 @@ Return to the Smallstep console. ## Troubleshooting tips * Initial activation of Entra ID OIDC provisioning in Smallstep SSH requires entering your **Application (client) ID**, **Client secret**, and **Configuration Endpoint** into the Smallstep UI. Contact Smallstep support with any questions | [support@smallstep.com](mailto:support@smallstep.com) +* UIDs and GIDs. By default, Smallstep auto-assigns POSIX UIDs and GIDs for your users. Alternatively, you can sync POSIX UID and GID values from Entra ID to Smallstep. + * See our guide [How to sync UIDs and GIDs from Microsoft Entra ID](./entra-id-gid-uid.mdx). * Note: When users are deactivated in Entra ID, they will be deactivated in Smallstep. Users will not be able to SSH to servers, but their user accounts will remain on Smallstep managed hosts. To permanently delete user data on Smallstep managed hosts, contact Smallstep support | [support@smallstep.com](mailto:support@smallstep.com) diff --git a/ssh/entra-id-gid-uid.mdx b/ssh/entra-id-gid-uid.mdx new file mode 100644 index 00000000..0876daf6 --- /dev/null +++ b/ssh/entra-id-gid-uid.mdx @@ -0,0 +1,101 @@ +--- +updated_at: December 01, 2026 +title: Entra ID UID GID Sync Guide +description: Synchronize Unix user and group IDs with Microsoft Entra ID for SSH access. Maintain consistent identity across SSH infrastructure for unified management. +html_title: Microsoft Entra ID UID/GID Sync for SSH Access Control +--- + +### How to sync UIDs and GIDs from Microsoft Entra ID + +Smallstep can sync POSIX user and group IDs for your users from your identity provider. + +Entra ID users do not have UID and GID fields. +You add them as directory extension attributes, and then map them to Smallstep in your SCIM provisioning settings. + +This feature does not sync POSIX group membership. Smallstep syncs only the UID and GID values. + +Before you start, [sync Entra ID users to Smallstep](../tutorials/sync-entra-id-users-to-smallstep.mdx) via SCIM provisioning. + +### Step 1. Create `uid` and `gid` directory extensions + +Already have UID and GID directory extensions for your users? Skip to Step 2. + +* Open [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) and sign in as an administrator of your tenant. + Consent to the `Application.ReadWrite.All` and `User.ReadWrite.All` permissions when Graph Explorer asks. +* Choose an app registration in your tenant to own the extensions. + You can use the app registration that comes with your Smallstep enterprise application. + Find its **Object ID** on the app registration's **Overview** page. + Do not use the **Application (client) ID** here. +* Send this request, with your Object ID in place of `{object-id}`: + + ```http + POST https://graph.microsoft.com/v1.0/applications/{object-id}/extensionProperties + + { + "name": "uid", + "dataType": "Integer", + "targetObjects": ["User"] + } + ``` + +* Send the same request again, with `"name": "gid"`. +* Each response contains the full attribute name, in the form `extension__uid` or `extension__gid`. + Save them for the next step. + +### Step 2. Set UID and GID values for your users + +* For each user, send this request, with the user's object ID or user principal name in place of `{user-id}`: + + ```http + PATCH https://graph.microsoft.com/v1.0/users/{user-id} + + { + "extension__uid": 10001, + "extension__gid": 10001 + } + ``` + +* To do this for many users, use the Microsoft Graph PowerShell SDK or your identity management tooling. + +Do not use UIDs or GIDs that are already in use on your hosts, such as those of system and service accounts. +Many teams start user IDs at 10000 or higher. + +### Step 3. Add `uid` and `gid` target attributes to your Smallstep application + +* In Entra ID, open your Smallstep enterprise application and go to **Provisioning → Attribute mapping**. +* Choose **Provision Microsoft Entra ID Users**. +* Select **Show advanced options**, then **Edit attribute list for customappsso**. +* At the bottom of the list, add these two attributes: + + | Name | Type | + |------|------| + | `urn:ietf:params:scim:schemas:extension:smallstep:2.0:User:uid` | Integer | + | `urn:ietf:params:scim:schemas:extension:smallstep:2.0:User:gid` | Integer | + +* Choose **Save**. + +> **Use these exact attribute names.** Entra ID only sends custom attributes when a user is created if the attribute name has the form `urn:ietf:params:scim:schemas:extension::2.0:User:`. +> If you use the `urn:scim:smallstep:ssh:schema` namespace from the [Okta instructions](./okta-gid-uid.mdx), new users sync to Smallstep without a UID or GID. + +### Step 4. Map the attributes + +* Return to the **Attribute Mapping** page and choose **Add New Mapping**. + * **Mapping type:** Direct + * **Source attribute:** `uid (extension__uid)` + * **Target attribute:** `urn:ietf:params:scim:schemas:extension:smallstep:2.0:User:uid` + * **Apply this mapping:** Always +* Choose **OK**. +* Do the same for `gid`. +* Choose **Save**. + +If the extensions are not in the **Source attribute** list, close the provisioning page and open it again. +Entra ID finds new directory extensions when you open the page. + +### Step 5. Verify syncing with Smallstep before going into production + +* To test one user, use **Provision on demand** in your Smallstep enterprise application. +* To send all users again, choose **Restart provisioning** in the **Provisioning** panel. + Entra ID only sends users that it considers changed, so users that synced before you added the mappings do not get a UID or GID until you restart provisioning. +* In the Smallstep console, go to **Users** and verify that users have their UID and GID values. + +Questions? Send an email to [support@smallstep.com](mailto:support@smallstep.com). diff --git a/tutorials/protect-github-ssh.mdx b/tutorials/protect-github-ssh.mdx index abc39a3e..ff4bbfec 100644 --- a/tutorials/protect-github-ssh.mdx +++ b/tutorials/protect-github-ssh.mdx @@ -1,5 +1,5 @@ --- -updated_at: October 13, 2026 +updated_at: December 01, 2026 title: Protect GitHub with SSH Certificates html_title: Protect GitHub Repositories with Hardware-Bound SSH Certificates description: Authenticate to GitHub with short-lived SSH certificates backed by your device's TPM or Secure Enclave, issued and managed by the Smallstep Agent. @@ -94,11 +94,73 @@ Then add the GitHub username attribute: with their GitHub usernames populated. It may take a few minutes for changes to sync. -### Google Workspace and Microsoft Entra ID +### Microsoft Entra ID + +First, [sync Entra ID users to Smallstep](./sync-entra-id-users-to-smallstep.mdx) via SCIM provisioning, if you haven't already. + +Entra ID users do not have a GitHub username field. +You'll need to add one (for example, as a directory extension attribute), and then map it to Smallstep. + +1. **Create a `githubUsername` directory extension:** + - Open [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) and sign in as an administrator of your tenant. + Consent to the `Application.ReadWrite.All` and `User.ReadWrite.All` permissions when Graph Explorer asks. + - Choose an app registration in your tenant to own the extension. + You can use the app registration that comes with your Smallstep enterprise application. + Find its **Object ID** on the app registration's **Overview** page. + Do not use the **Application (client) ID** here. + - Send this request, with your Object ID in place of `{object-id}`: + + ```http + POST https://graph.microsoft.com/v1.0/applications/{object-id}/extensionProperties + + { + "name": "githubUsername", + "dataType": "String", + "targetObjects": ["User"] + } + ``` + + - The response contains the full attribute name, in the form `extension__githubUsername`. + Save it for the next step. +2. **Populate GitHub usernames:** + - For each user, send this request, with the user's object ID or user principal name in place of `{user-id}`: + + ```http + PATCH https://graph.microsoft.com/v1.0/users/{user-id} + + { + "extension__githubUsername": "octocat" + } + ``` + + - To do this for many users, use the Microsoft Graph PowerShell SDK or your identity management tooling. +3. **Add the target attribute to the Smallstep application:** + - In Entra ID, open your Smallstep enterprise application and go to **Provisioning** → **Attribute mapping** + - Choose **Provision Microsoft Entra ID Users** + - Select **Show advanced options**, then **Edit attribute list for customappsso** + - At the bottom of the list, add this exact attribute: + - **Name:** `urn:ietf:params:scim:schemas:extension:smallstep:2.0:User:githubUsername` + - **Type:** String + - Choose **Save** +4. **Map the attribute:** + - Return to the **Attribute Mapping** page and choose **Add New Mapping** + - **Mapping type:** Direct + - **Source attribute:** `githubUsername (extension__githubUsername)` + - **Target attribute:** `urn:ietf:params:scim:schemas:extension:smallstep:2.0:User:githubUsername` + - **Apply this mapping:** Always + - Choose **OK**, then **Save** + - If the extension is not in the **Source attribute** list, close the provisioning page and open it again. + Entra ID finds new directory extensions when you open the page. +5. **Verify synchronization:** + - To test one user, use **Provision on demand** in your Smallstep enterprise application. + - To send all users again, choose **Restart provisioning** in the **Provisioning** panel. + Entra ID only sends users that it considers changed, so users that synced before you added the mapping do not get a GitHub username until you restart provisioning. + - In your Smallstep dashboard, go to **Users** and verify that users have their GitHub usernames. + +### Google Workspace -User sync is available for [Google Workspace](./sync-google-workspace-users-to-smallstep.mdx) -and [Entra ID](./sync-entra-id-users-to-smallstep.mdx). -For help mapping a GitHub username attribute from these providers, +User sync is available for [Google Workspace](./sync-google-workspace-users-to-smallstep.mdx). +For help mapping a GitHub username attribute from Google Workspace, [contact us](https://support.smallstep.com/en/contact-us). # Step 1: Configure credential issuance