commit | 67484d9008eb427b7e221ec688902bf1ce80664a | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@opennetworking.org> | Tue Jul 17 11:51:54 2018 -0700 |
committer | Thomas Vachuska <tom@opennetworking.org> | Tue Jul 17 12:10:00 2018 -0700 |
tree | 84449ed5f6a925b3321d8dc2e2db32c0e0669e4f | |
parent | 3933295cd0aff9d669bd3ec27a7a78ac4ad216d1 [diff] |
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/tools/package/archetypes/rest/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/tools/package/archetypes/rest/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml index 015f85e..f2b06c7 100644 --- a/tools/package/archetypes/rest/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml +++ b/tools/package/archetypes/rest/src/main/resources/archetype-resources/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>
diff --git a/tools/package/runtime/bin/onos-compile-yang b/tools/package/runtime/bin/onos-compile-yang index 22044b5..943716d 100755 --- a/tools/package/runtime/bin/onos-compile-yang +++ b/tools/package/runtime/bin/onos-compile-yang
@@ -1,5 +1,4 @@ #!/bin/bash - # # Copyright 2015-present Open Networking Foundation # @@ -44,4 +43,4 @@ file=$(basename $yang) modelId="$(echo $file | sed -E 's/(.zip|.jar|.yang)$//g')" -curl $URL?modelId=$modelId -F"file=@$yang" +$curl $URL?modelId=$modelId -F"file=@$yang"