Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Add the ability to pass in a url for SSO authentication. #22

Open
wants to merge 2 commits into
base: refactoring
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Database configuration
Gerrit Auth
----
* `node['gerrit']['auth']['type']` - Set auth type ([auth.type](http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/config-gerrit.html#auth.type)). Defaults to `OPENID`.
* `node['gerrit']['auth']['url']` - Value of `openIdSsoUrl` if the auth type is 'OpenID_SSO'.

E-mail
----
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
default['gerrit']['config']['database']['password'] = "gerrit"
default['gerrit']['config']['index']['type'] = "LUCENE"
default['gerrit']['config']['auth']['type'] = "OPENID"
default['gerrit']['config']['auth']['url'] = nil
default['gerrit']['config']['auth']['registerEmailPrivateKey'] = nil
default['gerrit']['config']['auth']['restTokenPrivateKey'] = nil
default['gerrit']['config']['sendemail']['smtpServer'] = "localhost"
Expand Down
3 changes: 3 additions & 0 deletions templates/default/gerrit/gerrit.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<% end %>
[auth]
type = <%= node['gerrit']['auth']['type'] %>
<% if node['gerrit']['auth']['type'] == 'OpenID_SSO' %>
openIdSsoUrl = <%= node['gerrit']['auth']['url'] %>
<% end %>
<% if node['gerrit']['auth']['type'] == 'LDAP' %>
[ldap]
<% node['gerrit']['ldap'].each do |k, v| %>
Expand Down