Thomas Vachuska
Committed by Gerrit Code Review

Providing sample web.xml configuration for enabling basic authentication of REST API & GUI.

Change-Id: I1ee8853945611d7778a4a4dc38883cfe266a5efa
......@@ -20,6 +20,31 @@
id="ONOS" version="2.5">
<display-name>ONOS REST API v1.0</display-name>
<!--
<security-constraint>
<display-name>authenticated</display-name>
<web-resource-collection>
<web-resource-name>All files</web-resource-name>
<description/>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>karaf</realm-name>
</login-config>
<security-role>
<description/>
<role-name>admin</role-name>
</security-role>
-->
<servlet>
<servlet-name>JAX-RS Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
......
......@@ -25,6 +25,31 @@
</welcome-file-list>
<!--
<security-constraint>
<display-name>authenticated</display-name>
<web-resource-collection>
<web-resource-name>All files</web-resource-name>
<description/>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>karaf</realm-name>
</login-config>
<security-role>
<description/>
<role-name>admin</role-name>
</security-role>
-->
<!--
<servlet>
<servlet-name>Index Page</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
......