Skip to content

Add Saml Group Links API support for Member Roles

Alex Buijs requested to merge support-member-roles-for-saml-group-link-api into master

What does this MR do and why?

Add SamlGroupLink API support for custom roles.

Exposes and saves a member_role_id to SamlGroupLink.

How to set up and validate locally

  1. Enable Group SAML

    gdk config set omniauth.group_saml.enabled true && gdk reconfigure && gdk restart rails-web
  2. Create a group with Ultimate license

  3. Enable the feature flag in the console:

    Feature.enable(:custom_roles_for_saml_group_links)
  4. Configure SAML SSO in group settings by adding a bogus IDP.

    image

  5. Go to http://localhost:3000/groups/${group_id}/-/settings/roles_and_permissions and create a custom role with Developer base access

  6. Make API request with your personal access token with api scope:

    curl --location --request POST 'http://localhost:3000/api/v4/groups/${group_id}/saml_group_links?saml_group_name=my-group&access_level=30&member_role_id=${member_role_id}' --header 'PRIVATE-TOKEN: ${personal_access_token}'
  7. Verify the response looks like:

    {"name":"my-group","access_level":30,"member_role_id":1}

Issue: #417201 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ian Anderson

Merge request reports