Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add saml group links #2367

Merged
merged 4 commits into from
Nov 21, 2022
Merged

feat: add saml group links #2367

merged 4 commits into from
Nov 21, 2022

Conversation

abhiandthetruth
Copy link
Contributor

CLOSES #2270

@nejch
Copy link
Member

nejch commented Nov 16, 2022

Just ping us here if you get stuck with anything @abhiandthetruth. Thanks for working on this!

@abhiandthetruth
Copy link
Contributor Author

@nejch occupied with some other work atm. Will try to complete soon

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2022

Codecov Report

Merging #2367 (3405a25) into main (9d2b1ad) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2367   +/-   ##
=======================================
  Coverage   95.96%   95.97%           
=======================================
  Files          80       80           
  Lines        5331     5342   +11     
=======================================
+ Hits         5116     5127   +11     
  Misses        215      215           
Flag Coverage Δ
api_func_v4 83.73% <90.90%> (+0.03%) ⬆️
cli_func_v4 82.38% <90.90%> (+0.01%) ⬆️
unit 87.75% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/objects/groups.py 90.55% <100.00%> (+0.61%) ⬆️

@abhiandthetruth abhiandthetruth marked this pull request as ready for review November 20, 2022 13:48
@abhiandthetruth
Copy link
Contributor Author

@nejch can you have a look?
Disabled functional tests since cant get them to work, getting 401 while creating a new saml group link. Might need to setup an identity provider in CI.

@abhiandthetruth abhiandthetruth requested review from lmilbaum and nejch and removed request for lmilbaum and nejch November 20, 2022 15:36
@nejch
Copy link
Member

nejch commented Nov 21, 2022

@nejch can you have a look? Disabled functional tests since cant get them to work, getting 401 while creating a new saml group link. Might need to setup an identity provider in CI.

note to self:

# https://docs.gitlab.com/ee/integration/omniauth.html#configure-initial-settings
# https://docs.gitlab.com/ee/integration/saml.html#general-setup
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
  {
    name: "saml",
    args: {
      assertion_consumer_service_url: "http://localhost:8080/users/auth/saml/callback",
      idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      idp_sso_target_url: "https://login.example.com/idp",
      issuer: "http://localhost:8080",
      name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
    }
  }
]

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work here @abhiandthetruth! The request body matcher in the unit tests will really help with confidence until we have a functional test setup for this.

I've squashed the commits here as the others weren't strictly for the changelog as a feat :)

@nejch nejch merged commit 1020ce9 into python-gitlab:main Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for API Endpoint for SAML Group Sync
4 participants