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

Gitlab (self-hosted) SSO #94

Closed
kakawait opened this issue Sep 9, 2017 · 14 comments
Closed

Gitlab (self-hosted) SSO #94

kakawait opened this issue Sep 9, 2017 · 14 comments

Comments

@kakawait
Copy link

kakawait commented Sep 9, 2017

Summary

AWX offers Github & Github Enterprise authentication, however I would be able to connect with other OAuth2 system like GitLab (Gitlab.com and self-hosted instances).

You can:

  1. Add Gitlab.com and self-hosted gitlab instances but further request for others systems can comes in futur
  2. Maybe create a generic OAuth2 auth that can work with any OAuth2 base auth external system
@kakawait kakawait changed the title Gitlab (self-hosted) authentication Gitlab (self-hosted) SSO Sep 9, 2017
@aoyawale
Copy link

aoyawale commented Sep 9, 2017

I believe django uses https://github.com/python-social-auth/social-app-django for that part and it looks like they have an initial part for gitlab https://python-social-auth.readthedocs.io/en/latest/backends/gitlab.html

@AlexGluck
Copy link

I'm interested on it too.

@wenottingham
Copy link
Contributor

I believe django uses https://github.com/python-social-auth/social-app-django for that part

This is correct - we'd need to work with that.

@matburt
Copy link
Member

matburt commented Sep 9, 2017

This would also have a UI component for the SSO link and any relevant update to the tower api config endpoint.

@jlmitch5
Copy link
Contributor

if someone is interested in working on a pr for this, feel free to @ me on the UI side of things, I did the initial implementation of the third-party auth work.

@matburt
Copy link
Member

matburt commented Sep 14, 2017

Unfortunately we're going to be blocked on this one until we upgrade our python-social-auth core version. Good news is that we are planning on doing that with the next set of features/mass upgrades.

@rahst12
Copy link

rahst12 commented Nov 15, 2017

This is really useful. We use a corporate hosted GitLab (7.14.0) that I would much prefer just to have people login to Ansible Tower with than to create individual users for each person.

@matburt
Copy link
Member

matburt commented Nov 27, 2017

The core social auth system was updated week before last, so if it's something you need then please submit a PR.

@rahst12
Copy link

rahst12 commented Jun 11, 2018

Any traction on this one? Is there a way to increase the timeout of a logged-in session?

@rahst12
Copy link

rahst12 commented Nov 2, 2018

@matburt is there a starting point you could push me toward? I'm invested in seeing something like this working, but would need a little help getting into this code base.

@wenottingham
Copy link
Contributor

Genericizing it would be a reasonable amount of work.

Copy-pasta-ing the existing code for a new backend would, in theory, not be that complicated.

@matburt
Copy link
Member

matburt commented Nov 2, 2018

We use python social auth, and it does include a gitlab backend: https://python-social-auth-docs.readthedocs.io/en/latest/backends/gitlab.html

You'll want to look at how our SSO system is implemented:

(as a starting point)
https://github.com/ansible/awx/blob/devel/awx/sso/fields.py#L99-L103
https://github.com/ansible/awx/blob/devel/awx/sso/conf.py#L635-L699

and the social auth docs regarding what is required for the backend:
https://python-social-auth-docs.readthedocs.io/en/latest/backends/gitlab.html

It's probably not too hard, but our built-in settings system means you'll just need to be aware of where you need to make the changes. @rooftopcellist has done a good bit of work around here. You can track us down on irc and the mailing list if you have issues implementing it

We have some architectural docs for the overal auth system:
https://github.com/ansible/awx/tree/devel/docs/auth

@rahst12
Copy link

rahst12 commented Jun 10, 2021

Any movement on this? +1 for still wanted.

@ffirg
Copy link

ffirg commented Feb 15, 2022

I'm closing this issue as we would not look to do anything through this mechanism. SSO as a platform feature in now under consideration for controller and would address all SSO needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests