Skip to content

Commit

Permalink
LDEV-4272: Do not allow in LAMS any HTTP methods other than GET or POST.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinCieslak committed Mar 15, 2017
1 parent ec4f9b5 commit 2a70ed7
Show file tree
Hide file tree
Showing 35 changed files with 268 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lams_admin/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>GROUP MANAGER</role-name>
Expand Down
14 changes: 14 additions & 0 deletions lams_central/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>General secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand Down Expand Up @@ -670,13 +674,17 @@
<url-pattern>/includes/font-awesome/*</url-pattern>
<url-pattern>/ckeditor/*</url-pattern>
<url-pattern>/favicon.ico</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>

<security-constraint>
<web-resource-collection>
<web-resource-name>Authoring content</web-resource-name>
<url-pattern>/authoring/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -690,6 +698,8 @@
<web-resource-name>Organisation grouping</web-resource-name>
<url-pattern>/orgGroup.jsp</url-pattern>
<url-pattern>/orgGrouping.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -704,6 +714,8 @@
<web-resource-name>Add lesson</web-resource-name>
<url-pattern>/addLesson.jsp</url-pattern>
<url-pattern>/lti/addLesson.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand All @@ -716,6 +728,8 @@
<web-resource-name>Sysadmin content</web-resource-name>
<url-pattern>/admin.jsp</url-pattern>
<url-pattern>/sysadmin.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>SYSADMIN</role-name>
Expand Down
6 changes: 6 additions & 0 deletions lams_gradebook/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>GROUP MANAGER</role-name>
Expand All @@ -259,6 +263,8 @@
<web-resource-collection>
<web-resource-name>Monitor content</web-resource-name>
<url-pattern>/gradebookMonitoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>SYSADMIN</role-name>
Expand Down
4 changes: 4 additions & 0 deletions lams_learning/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand Down
6 changes: 6 additions & 0 deletions lams_monitoring/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand All @@ -206,6 +210,8 @@
<web-resource-collection>
<web-resource-name>Lesson start content</web-resource-name>
<url-pattern>/monitoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Author can preview the lesson -->
Expand Down
8 changes: 8 additions & 0 deletions lams_tool_assessment/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -221,6 +225,8 @@
<web-resource-name>Authoring content</web-resource-name>
<url-pattern>/authoring/*</url-pattern>
<url-pattern>/pages/authoring/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -234,6 +240,8 @@
<url-pattern>/monitoring/*</url-pattern>
<url-pattern>/pages/monitoring/*</url-pattern>
<url-pattern>/definelater.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand Down
10 changes: 10 additions & 0 deletions lams_tool_bbb/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -226,6 +230,8 @@
<url-pattern>/authoring/*</url-pattern>
<url-pattern>/pages/authoring/*</url-pattern>
<url-pattern>/authoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -238,6 +244,8 @@
<web-resource-name>Staff content</web-resource-name>
<url-pattern>/pages/monitoring/*</url-pattern>
<url-pattern>/monitoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand All @@ -250,6 +258,8 @@
<web-resource-name>Admin content</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<url-pattern>/pages/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>SYSADMIN</role-name>
Expand Down
8 changes: 8 additions & 0 deletions lams_tool_chat/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -242,6 +246,8 @@
<url-pattern>/pages/authoring/*</url-pattern>
<url-pattern>/authoring.do</url-pattern>
<url-pattern>/pedagogicalPlanner.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -254,6 +260,8 @@
<web-resource-name>Staff content</web-resource-name>
<url-pattern>/pages/monitoring/*</url-pattern>
<url-pattern>/monitoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand Down
8 changes: 8 additions & 0 deletions lams_tool_daco/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -223,6 +227,8 @@
<web-resource-name>Authoring content</web-resource-name>
<url-pattern>/authoring/*</url-pattern>
<url-pattern>/pages/authoring/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -236,6 +242,8 @@
<url-pattern>/monitoring/*</url-pattern>
<url-pattern>/pages/monitoring/*</url-pattern>
<url-pattern>/definelater.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand Down
4 changes: 4 additions & 0 deletions lams_tool_eadventure/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Public content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>
</web-app>
8 changes: 8 additions & 0 deletions lams_tool_forum/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -247,6 +251,8 @@
<url-pattern>/authoring/*</url-pattern>
<url-pattern>/jsps/authoring/*</url-pattern>
<url-pattern>/authoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -261,6 +267,8 @@
<url-pattern>/jsps/monitoring/*</url-pattern>
<url-pattern>/monitoring.do</url-pattern>
<url-pattern>/definelater.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand Down
10 changes: 10 additions & 0 deletions lams_tool_gmap/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,14 @@
</jsp-config>

<!-- Security Constraint -->
<deny-uncovered-http-methods />

<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>LEARNER</role-name>
Expand All @@ -239,6 +243,8 @@
<web-resource-name>Authoring content</web-resource-name>
<url-pattern>/pages/authoring/*</url-pattern>
<url-pattern>/authoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHOR</role-name>
Expand All @@ -251,6 +257,8 @@
<web-resource-name>Staff content</web-resource-name>
<url-pattern>/pages/monitoring/*</url-pattern>
<url-pattern>/monitoring.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>MONITOR</role-name>
Expand All @@ -263,6 +271,8 @@
<web-resource-name>Admin content</web-resource-name>
<url-pattern>/pages/admin/*</url-pattern>
<url-pattern>/lagmap10admin.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>SYSADMIN</role-name>
Expand Down
Loading

0 comments on commit 2a70ed7

Please sign in to comment.