-
Notifications
You must be signed in to change notification settings - Fork 3
OpenGrok
Paul Healy edited this page Mar 15, 2017
·
1 revision
Add repo/auth details under ~tomcat (this directory probably needs to be created.
In tomcat-users.xml add:
<role rolename="grokuser"/>
<user username="foo" password="bar" roles="grokuser"/>
In web.xml add:
<security-constraint>
<web-resource-collection>
<web-resource-name>
OpenGrok Server
</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>grokuser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>grokuser</role-name>
</security-role>
In server.xml under Engine add:
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>