Added RBAC for REST APIs.
- admin role required for POST, PUT, DELETE & PATCH
- viewer role required for all other requests
- cleaned up all web.xml files for consistency and correctness
Change-Id: I33bad5cec0fb0f4285eed84173025b0a107b5aec
diff --git a/apps/ofagent/src/main/webapp/WEB-INF/web.xml b/apps/ofagent/src/main/webapp/WEB-INF/web.xml
index cc3d463..b71cf1d 100644
--- a/apps/ofagent/src/main/webapp/WEB-INF/web.xml
+++ b/apps/ofagent/src/main/webapp/WEB-INF/web.xml
@@ -28,11 +28,13 @@
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
+ <role-name>viewer</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>admin</role-name>
+ <role-name>viewer</role-name>
</security-role>
<login-config>