- Added weblogic.xml to WAR for deployment on WebLogic (issue 199)\r
- Support username substitution in web.otherUrls (issue 213)\r
- Option to force client-side basic authentication instead of form-based authentication if web.authenticateViewPages=true (issue 222)\r
+ - Setting to automatically create an user account based on an authenticated user principal from the servlet container (issue-246)\r
\r
contributors:\r
- Bandarupalli Satyanarayana\r
- Matthias Bauer\r
- Micha�l Pailloncy\r
- Michael Schaefers\r
+ - Oliver Doepner\r
- Philip Boutros\r
- Rafael Cavazin\r
- Ryan Schneider\r
- { name: 'git.daemonPort', defaultValue: 0 }\r
- { name: 'git.defaultIncrementalPushTagPrefix', defaultValue: 'r' }\r
- { name: 'mail.smtps', defaultValue: false }\r
+ - { name: 'realm.container.autoCreateAccounts', defaultValue: 'false' }\r
- { name: 'realm.salesforce.backingUserService', defaultValue: 'users.conf' }\r
- { name: 'realm.salesforce.orgId', defaultValue: 0 }\r
- { name: 'web.activityDurationChoices', defaultValue: '7 14 28 60 90 180' }\r
# Advanced Realm Settings\r
#\r
\r
+# Auto-creates user accounts based on the servlet container principal. This\r
+# assumes that your Gitblit install is a protected resource and your container's\r
+# authentication process intercepts all Gitblit requests.\r
+#\r
+# SINCE 1.3.0\r
+realm.container.autoCreateAccounts = false\r
+\r
# The SalesforceUserService must be backed by another user service for standard user\r
# and team management.\r
# default: users.conf\r
Principal principal = httpRequest.getUserPrincipal();
if (principal != null) {
String username = principal.getName();
- if (StringUtils.isEmpty(username)) {
+ if (!StringUtils.isEmpty(username)) {
UserModel user = getUserModel(username);
if (user != null) {
+ // existing user
flagWicketSession(AuthenticationType.CONTAINER);
logger.debug(MessageFormat.format("{0} authenticated by servlet container principal from {1}",
user.username, httpRequest.getRemoteAddr()));
return user;
+ } else if (settings.getBoolean(Keys.realm.container.autoCreateAccounts, true)) {
+ // auto-create user from an authenticated container principal
+ user = new UserModel(username.toLowerCase());
+ user.displayName = username;
+ user.password = Constants.EXTERNAL_ACCOUNT;
+ userService.updateUserModel(user);
+ flagWicketSession(AuthenticationType.CONTAINER);
+ logger.debug(MessageFormat.format("{0} authenticated and created by servlet container principal from {1}",
+ user.username, httpRequest.getRemoteAddr()));
+ return user;
} else {
logger.warn(MessageFormat.format("Failed to find UserModel for {0}, attempted servlet container authentication from {1}",
principal.getName(), httpRequest.getRemoteAddr()));