Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,185
    • Issues 44,185
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,496
    • Merge requests 1,496
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #297389
Closed
Open
Created Jan 12, 2021 by Melissa Ushakov@mushakovDeveloper

Group SAML - Check SSO status on API activity and direct user to SSO

Problem to solve

While we're enforcing SSO, we should similarly enforce SSO outside of the GitLab UI. For the purposes of security, this gives enterprises a greater degree of control over protected resources.

Proposal

We should perform the same check on API activity that we do in the UI:

  • When a user attempts an API action in a group that's enforcing SSO:
    • If the represented user does not meet the SSO login threshold, present them with an error: "Cannot find valid SSO session. Please login via your group's SSO at #{group_saml_url}"
  • This change should be a configuration option at the group level.
  • Credentials that are not tied to human users should not have an SSO check enforces (Project Access token, deploy keys, etc).

Iteration plan

  1. Introduce a new configuration option at the group level. This option should be disabled by default for existing and new SAML setups:

image

  1. If user attempts an API action in a group that's enforcing SSO, and the represented user does not meet the SSO login threshold, present them with an error: ``"Cannot find valid SSO session. Please login via your group's SSO at #{group_saml_url}"

  2. Credentials that are not tied to human users should not have an SSO check enforces (Project Access token, deploy keys, etc).

Availability & Testing

What risks does this change pose to our availability?

A potential risk to account access: Users/bots may lose access incase we default enable the enforce SSO for API activity for all existing accounts that use PAT for automated access.

What additional test coverage or changes to tests will be needed?

  • Ensure the feature is off by default
  • Ensure Project access tokens (for bot users) are exempt from this enforcement.
  • Ensure Personal access tokens are NOT exempt from this enforcement.

Also, we should be adding end-to-end tests coverage for this feature.

Edited Nov 05, 2021 by Hannah Sutor
Assignee
Assign to
Time tracking