I’m trying to setup gerrit HTTP authentication.
I am reading the documentation at gerrit http authentication which briefly talks about how to setup apache but where exactly do I put this piece of code and configure apache tomcat?
Otherwise, I researched and found out about “siteminder” for http authentication; am I supposed to be using that instead?
My requirements are that I have my own set of user accounts in my custom system and I need each of my user accounts to be able to interact with gerrit so I figured http would allow custom creation/duplicate of each.
Took me a while to figure this out.
Tomcat was installed and tested.
Then I copied gerrit war file over and put it in tomcat/webapps. Then from the tomcat manager http://[host]:8080/manager/ I installed it (by clicking the start button)
Then I had to install mysql J Connector. Basically download it from Mysql and copy the jar file into tomcat/lib
Next I created a file in tomcat/webapps/gerrit/META-INF called Context.xml
Because I had used bouncy castle with the daemon I had to copy the .jar file from original install to tomcat/webapps/gerrit/WEB-INF/lib
Then I managed to start gerrit to see if it was working. Try accessing http://[host]:8080/gerrit This should give you an error from gerrit about bad Apache conf.
Than I reconfigured my apache virtual host like this. So I access gerrit with http://gerrit/gerrit
This then uses http auth before passing your request onto the tomcat server.