diff --git a/doc/api/group_ldap_links.md b/doc/api/group_ldap_links.md new file mode 100644 index 0000000000000000000000000000000000000000..11db78aae47ba2a9962e6536a5c4662016f657b0 --- /dev/null +++ b/doc/api/group_ldap_links.md @@ -0,0 +1,152 @@ +--- +stage: Data Stores +group: Tenant Scale +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# LDAP group links + +DETAILS: +**Tier:** Premium, Ultimate +**Offering:** Self-managed + +List, add, and delete [LDAP group links](../user/group/access_and_permissions.md#manage-group-memberships-via-ldap). + +## List LDAP group links + +Lists LDAP group links. + +```plaintext +GET /groups/:id/ldap_group_links +``` + +Supported attributes: + +| Attribute | Type | Required | Description | +| --------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding). | + +Example request: + +```shell +curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/4/ldap_group_links" +``` + +Example response: + +```json +[ + { + "cn": "group1", + "group_access": 40, + "provider": "ldapmain", + "filter": null, + "member_role_id": null + }, + { + "cn": "group2", + "group_access": 10, + "provider": "ldapmain", + "filter": null, + "member_role_id": null + } +] +``` + +## Add an LDAP group link with CN or filter + +Adds an LDAP group link using a CN or filter. + +```plaintext +POST /groups/:id/ldap_group_links +``` + +Supported attributes: + +| Attribute | Type | Required | Description | +| --------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding). | +| `group_access` | integer | yes | [Role (`access_level`)](members.md#roles) for members of the LDAP group. | +| `provider` | string | yes | LDAP provider ID for the LDAP group link. | +| `cn` | string | yes/no | The CN of an LDAP group. Provide either a `cn` or a `filter`, but not both. | +| `filter` | string | yes/no | The LDAP filter for the group. Provide either a `cn` or a `filter`, but not both. | +| `member_role_id` | integer | no | The ID of the [member role](member_roles.md). Ultimate only. | + +Example request: + +```shell +curl --request POST \ + --header "PRIVATE-TOKEN: <your_access_token>" \ + --header "Content-Type: application/json" \ + --data '{"group_access": 40, "provider": "ldapmain", "cn": "group2"}' \ + --url "https://gitlab.example.com/api/v4/groups/4/ldap_group_links" +``` + +Example response: + +```json +{ + "cn": "group2", + "group_access": 40, + "provider": "main", + "filter": null, + "member_role_id": null +} +``` + +## Delete an LDAP group link with CN or filter + +Deletes an LDAP group link using a CN or filter. + +```plaintext +DELETE /groups/:id/ldap_group_links +``` + +Supported attributes: + +| Attribute | Type | Required | Description | +| --------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | +| `provider` | string | yes | LDAP provider ID for the LDAP group link. | +| `cn` | string | yes/no | The CN of an LDAP group. Provide either a `cn` or a `filter`, but not both. | +| `filter` | string | yes/no | The LDAP filter for the group. Provide either a `cn` or a `filter`, but not both. | + +Example request: + +```shell +curl --request DELETE \ + --header "PRIVATE-TOKEN: <your_access_token>" \ + --header "Content-Type: application/json" \ + --data '{"provider": "ldapmain", "cn": "group2"}' \ + --url "https://gitlab.example.com/api/v4/groups/4/ldap_group_links" +``` + +If successful, no response is returned. + +## Delete an LDAP group link (deprecated) + +Deletes an LDAP group link. Deprecated. Scheduled for removal in a future release. +Use [Delete an LDAP group link with CN or filter](#delete-an-ldap-group-link-with-cn-or-filter) instead. + +Delete an LDAP group link with a CN: + +```plaintext +DELETE /groups/:id/ldap_group_links/:cn +``` + +| Attribute | Type | Required | Description | +| --------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | +| `cn` | string | yes | The CN of an LDAP group | + +Delete an LDAP group link for a specific LDAP provider: + +```plaintext +DELETE /groups/:id/ldap_group_links/:provider/:cn +``` + +| Attribute | Type | Required | Description | +| --------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | +| `cn` | string | yes | The CN of an LDAP group | +| `provider` | string | yes | LDAP provider for the LDAP group link | diff --git a/doc/api/groups.md b/doc/api/groups.md index 1a855ba2fa3266ed3d19c1d8a50f30d398f41e78..c6a6e8b002682d6642a91381537537bd9dc2eaa8 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -1734,100 +1734,6 @@ Parameters: See the [Group Members](members.md) documentation. -## LDAP Group Links - -List, add, and delete LDAP group links. - -### List LDAP group links - -DETAILS: -**Tier:** Premium, Ultimate -**Offering:** Self-managed - -Lists LDAP group links. - -```plaintext -GET /groups/:id/ldap_group_links -``` - -| Attribute | Type | Required | Description | -| --------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | - -### Add LDAP group link with CN or filter - -DETAILS: -**Tier:** Premium, Ultimate -**Offering:** Self-managed - -Adds an LDAP group link using a CN or filter. Adding a group link by filter is only supported in the Premium and Ultimate tier. - -```plaintext -POST /groups/:id/ldap_group_links -``` - -| Attribute | Type | Required | Description | -| --------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | -| `cn` | string | no | The CN of an LDAP group | -| `filter` | string | no | The LDAP filter for the group | -| `group_access` | integer | yes | [Role (`access_level`)](members.md#roles) for members of the LDAP group | -| `provider` | string | yes | LDAP provider for the LDAP group link | - -NOTE: -To define the LDAP group link, provide either a `cn` or a `filter`, but not both. - -### Delete LDAP group link - -DETAILS: -**Tier:** Premium, Ultimate -**Offering:** Self-managed - -Deletes an LDAP group link. Deprecated. Scheduled for removal in a future release. - -```plaintext -DELETE /groups/:id/ldap_group_links/:cn -``` - -| Attribute | Type | Required | Description | -| --------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | -| `cn` | string | yes | The CN of an LDAP group | - -Deletes an LDAP group link for a specific LDAP provider. Deprecated. Scheduled for removal in a future release. - -```plaintext -DELETE /groups/:id/ldap_group_links/:provider/:cn -``` - -| Attribute | Type | Required | Description | -| --------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | -| `cn` | string | yes | The CN of an LDAP group | -| `provider` | string | yes | LDAP provider for the LDAP group link | - -### Delete LDAP group link with CN or filter - -DETAILS: -**Tier:** Premium, Ultimate -**Offering:** Self-managed - -Deletes an LDAP group link using a CN or filter. Deleting by filter is only supported in the Premium and Ultimate tier. - -```plaintext -DELETE /groups/:id/ldap_group_links -``` - -| Attribute | Type | Required | Description | -| --------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | -| `cn` | string | no | The CN of an LDAP group | -| `filter` | string | no | The LDAP filter for the group | -| `provider` | string | yes | LDAP provider for the LDAP group link | - -NOTE: -To delete the LDAP group link, provide either a `cn` or a `filter`, but not both. - ## SAML Group Links DETAILS: diff --git a/doc/subscriptions/bronze_starter.md b/doc/subscriptions/bronze_starter.md index 4e48e9441b2b68829eb304556065a0f511a37fe3..824e7a2aa069fca8e7cb2bb8db1c2500b8ba7e16 100644 --- a/doc/subscriptions/bronze_starter.md +++ b/doc/subscriptions/bronze_starter.md @@ -114,7 +114,7 @@ Bronze-level subscribers: - LDAP synchronization: - Certain fields in the [group details API](../api/groups.md#details-of-a-group) - [syncing groups](../api/groups.md#sync-group-with-ldap) - - Listing, adding, and deleting [group links](../api/groups.md#list-ldap-group-links) + - Listing, adding, and deleting [group links](../api/group_ldap_links.md) - [Push rules](../api/group_push_rules.md) - [Audit events](../api/audit_events.md), including [group audit events](../api/groups.md#group-audit-events) and