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

Feature request: Auto-create users for servlet container authenticated principals #542

Closed
gitblit opened this issue Aug 12, 2015 · 5 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 246

What steps will reproduce the problem?
1. Configure a realm in Tomcat that authenticates e.g. user X
2. Deploy gitblit WAR on Tomcat
3. Authenticate user X via Tomcat (not via gitblit login)
4. Gitblit will NOT treat the session principal as a user

What is the expected output? What do you see instead?

It would be great if gitblit could auto-create a gitblit user for the authenticated
principal if no gitblit user with that user id exists yet.

Instead it seems that Gitblit resolves an unknown principal as a null UserModel and
effectively ignores the principal.

What version of the product are you using? On what operating system?

Gitblit v1.2.1, WAR edition, deployed on Tomcat 7 on Debian 7 ("wheezy").

Please provide any additional information below.

According to James Moger, the Ldap and Redmine user services will auto-create user
accounts based on successful authentication. The same approach could be used for servlet
container based authentication.

See the related conversation between me and James here:
https://groups.google.com/forum/?fromgroups#!topic/gitblit/iBJwfrzpSaI

Reported by oliver.doepner on 2013-05-25 23:49:18

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-05-28 11:28:38

  • Status changed: Started
  • Labels added: Milestone-1.3.0

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

This has been implemented on master and tested with Tomcat 7.
By default, container-based auto-create is disabled but can easily be enabled with:

realm.container.autoCreateAccounts = true

Reported by James.Moger on 2013-06-17 20:05:33

  • Status changed: Queued

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Thank you so much, James. I will try out the feature as soon as I have some free cycles.

Cheers
Oliver

Reported by oliver.doepner on 2013-06-18 17:45:52

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Fix or enhancement released in v1.3.0

Reported by James.Moger on 2013-07-14 16:52:58

  • Status changed: Fixed

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

We are now using this feature with Gitblit 1.3.1. Works very well!
Thanks, James. :)

Reported by oliver.doepner on 2013-08-05 03:29:13

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.3.0 Dec 13, 2016
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

2 participants