[gerrit]
basePath = git
serverId = <serverid>
canonicalWebUrl = http://gerrit-server.my.domain.com:8081/
[database]
type = h2
database = /home/gerritadmin/gerrit_test/db/ReviewDB
[noteDb "changes"]
disableReviewDb = true
primaryStorage = note db
read = true
sequence = true
write = true
[index]
type = LUCENE
[auth]
type = HTTP
emailFormat = {0}@domain.com
httpHeader = X-Forwarded-User
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[container]
user = gerritadmin
javaHome = /usr/lib/jvm/java-8-oracle/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://<server_ip>:8081/
[cache]
directory = cache<VirtualHost *:80>
ServerName gerrit-server.my.domain.com
ServerAdmin m...@domain.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
OIDCProviderMetadataURL <google account address>
OIDCClientID <taken from google oauth2 client creds>
OIDCClientSecret <taken from google oauth2 client creds>
OIDCScope "openid email profile"
OIDCRedirectURI http://gerrit-server.my.domain.com:8081/oauth2callback
OIDCCryptoPassphrase blah # Note, not really sure what this does but it is required.
OIDCSessionInactivityTimeout 600
OIDCCookiePath /
OIDCAuthRequestParams hd=domain.com
OIDCRemoteUserClaim email
OIDCAuthNHeader X-Forwarded-User
RewriteEngine On
#LogLevel alert rewrite:trace2
RewriteRule ^/logout$ /oauth2callback?logout=http://gerrit-server.my.domain.com/ [R]
ProxyPass / http://<server_ip>:8081/ nocanon
ProxyPassReverse / http://<server_ip>:8081/
ProxyRequests Off
AllowEncodedSlashes On
<Proxy http://gerrit-server.my.domain.com:80/*>
# add rewrites here if necessary
</Proxy>
<Location /login/>
AuthType openid-connect
Require claim hd:domain.com
Require valid-user
</Location>
</VirtualHost>