1 <?xml version="1.0" encoding="UTF-8"?>
3 ~ Licensed to the Apache Software Foundation (ASF) under one
4 ~ or more contributor license agreements. See the NOTICE file
5 ~ distributed with this work for additional information
6 ~ regarding copyright ownership. The ASF licenses this file
7 ~ to you under the Apache License, Version 2.0 (the
8 ~ "License"); you may not use this file except in compliance
9 ~ with the License. You may obtain a copy of the License at
11 ~ http://www.apache.org/licenses/LICENSE-2.0
13 ~ Unless required by applicable law or agreed to in writing,
14 ~ software distributed under the License is distributed on an
15 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 ~ KIND, either express or implied. See the License for the
17 ~ specific language governing permissions and limitations
20 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
21 "http://struts.apache.org/dtds/struts-2.0.dtd">
23 <!-- ==================================================================
26 This should contain the /security namespaced action configurations.
28 These configurations will likely not need changing.
30 These configurations point to the overlaid jsp files.
31 ================================================================== -->
34 <!-- ==================================================================
35 Security Tools for Users
37 All Users should be able to access and use the actions contained
39 ================================================================== -->
41 <package name="security" extends="struts-default" namespace="/security">
43 <result-type name="security-external" class="securityExternalResult" />
47 <interceptor name="redbackForceAdminUser" class="redbackForceAdminUserInterceptor"/>
48 <interceptor name="redbackEnvCheck" class="redbackEnvironmentCheckInterceptor"/>
49 <interceptor name="redbackAutoLogin" class="redbackAutoLoginInterceptor"/>
50 <interceptor name="redbackPolicyEnforcement" class="redbackPolicyEnforcementInterceptor"/>
51 <interceptor name="redbackSecureActions" class="redbackSecureActionInterceptor"/>
54 Stacks are order dependent and fail silently by not running the referenced stack.
55 Make sure that redbackCommonStack remains above is usages.
57 <interceptor-stack name="redbackCommonStack">
58 <interceptor-ref name="redbackEnvCheck"/>
59 <interceptor-ref name="redbackForceAdminUser"/>
60 <interceptor-ref name="redbackAutoLogin"/>
61 <interceptor-ref name="redbackPolicyEnforcement"/>
62 <interceptor-ref name="redbackSecureActions">
63 <param name="enableReferrerCheck">true</param>
67 <interceptor-stack name="securedStack">
68 <interceptor-ref name="defaultStack"/>
69 <interceptor-ref name="redbackCommonStack"/>
70 <interceptor-ref name="tokenSession">
71 <param name="excludeMethods">*</param>
75 <interceptor-stack name="securedPrepareParamsStack">
76 <interceptor-ref name="paramsPrepareParamsStack"/>
77 <interceptor-ref name="redbackCommonStack"/>
82 <default-interceptor-ref name="securedStack"/>
85 <result name="security-admin-user-needed" type="redirectAction">
86 <param name="actionName">addadmin</param>
87 <param name="namespace">/security</param>
89 <result name="requires-authentication">/WEB-INF/jsp/redback/requiresAuthentication.jsp</result>
90 <result name="requires-authorization">/WEB-INF/jsp/redback/accessDenied.jsp</result>
91 <result name="security-must-change-password" type="redirectAction">
92 <param name="actionName">password</param>
93 <param name="namespace">/security</param>
95 <result name="security-resend-validation-email" type="redirectAction">
96 <param name="actionName">userlist</param>
97 <param name="namespace">/security</param>
99 <result name="invalid.token">/WEB-INF/jsp/redback/invalidToken.jsp</result>
102 <action name="login" class="redback-login" method="show">
103 <result name="input">/WEB-INF/jsp/redback/login.jsp</result>
104 <result name="error">/WEB-INF/jsp/redback/login.jsp</result>
105 <result name="security-login-success" type="security-external">
106 <param name="externalResult">security-login-success</param>
108 <result name="cancel" type="security-external">
109 <param name="externalResult">security-login-cancel</param>
111 <result name="security-login-locked" type="security-external">
112 <param name="externalResult">security-login-locked</param>
116 <action name="logout" class="redback-logout" method="logout">
117 <result name="security-logout" type="security-external">
118 <param name="externalResult">security-logout</param>
122 <action name="register" class="redback-register" method="show">
123 <result name="input">/WEB-INF/jsp/redback/register.jsp</result>
124 <result name="error">/WEB-INF/jsp/redback/register.jsp</result>
125 <result name="validation-note">/WEB-INF/jsp/redback/validationNotification.jsp</result>
126 <result name="security-register-success" type="security-external">
127 <param name="externalResult">security-register-success</param>
129 <result name="cancel" type="security-external">
130 <param name="externalResult">security-register-cancel</param>
134 <action name="account" class="redback-account" method="show">
135 <result name="input">/WEB-INF/jsp/redback/account.jsp</result>
136 <result name="error">/WEB-INF/jsp/redback/account.jsp</result>
137 <result name="security-account-success" type="security-external">
138 <param name="externalResult">security-account-success</param>
140 <result name="cancel" type="security-external">
141 <param name="externalResult">security-account-cancel</param>
145 <action name="password" class="redback-password" method="show">
146 <result name="input">/WEB-INF/jsp/redback/password.jsp</result>
147 <result name="error">/WEB-INF/jsp/redback/password.jsp</result>
148 <result name="security-login-success" type="security-external">
149 <param name="externalResult">security-login-success</param>
151 <result name="security-register-success" type="security-external">
152 <param name="externalResult">security-register-success</param>
154 <result name="success" type="redirect">${targetUrl}</result>
155 <result name="cancel" type="redirectAction">
156 <param name="actionName">logout</param>
157 <param name="namespace">/security</param>
159 <result name="security-change-password-success">/WEB-INF/jsp/redback/changePasswordSuccess.jsp</result>
162 <action name="passwordReset" class="redback-password-reset" method="show">
163 <result name="input">/WEB-INF/jsp/redback/requestPasswordReset.jsp</result>
164 <result name="none">/WEB-INF/jsp/redback/login.jsp</result>
167 <action name="addadmin" class="redback-admin-account" method="show">
168 <interceptor-ref name="defaultStack"/>
169 <result name="input">/WEB-INF/jsp/redback/admin/createAdmin.jsp</result>
170 <result name="error">/WEB-INF/jsp/redback/admin/createAdmin.jsp</result>
171 <result name="login-error">/WEB-INF/jsp/redback/login.jsp</result>
172 <result name="security-login-success" type="security-external">
173 <param name="externalResult">security-login-success</param>
175 <result name="security-login-locked" type="security-external">
176 <param name="externalResult">security-login-locked</param>
180 <!-- ==================================================================
181 Security Tools for Administrators
183 Only Administrators should be able to access and use these actions
184 ================================================================== -->
186 <action name="systeminfo" class="redback-sysinfo" method="show">
187 <result>/WEB-INF/jsp/redback/admin/systemInformation.jsp</result>
190 <action name="adminConsole" class="redback-admin-console" method="show">
191 <result>/WEB-INF/jsp/redback/admin/console.jsp</result>
194 <action name="report" class="redback-report" method="generate">
195 <result name="error" type="redirectAction">userlist</result>
198 <action name="userlist" class="redback-admin-user-list" method="show">
199 <result name="input">/WEB-INF/jsp/redback/admin/userList.jsp</result>
200 <result name="success">/WEB-INF/jsp/redback/admin/userList.jsp</result>
203 <action name="useredit" class="redback-admin-user-edit" method="edit">
204 <result name="input">/WEB-INF/jsp/redback/admin/userEdit.jsp</result>
205 <result name="error">/WEB-INF/jsp/redback/admin/userEdit.jsp</result>
206 <result name="confirm">/WEB-INF/jsp/redback/admin/confirmUserAdministrator.jsp</result>
207 <result name="confirmError">/WEB-INF/jsp/redback/admin/confirmUserAdministrator.jsp</result>
208 <result name="success" type="redirectAction">userlist</result>
209 <result name="cancel" type="redirectAction">userlist</result>
212 <action name="usercreate" class="redback-admin-user-create" method="show">
213 <result name="input">/WEB-INF/jsp/redback/admin/userCreate.jsp</result>
214 <result name="error">/WEB-INF/jsp/redback/admin/userCreate.jsp</result>
215 <result name="success" type="redirectAction">
216 <param name="actionName">assignments</param>
217 <param name="principal">${user.username}</param>
219 <interceptor-ref name="securedStack">
220 <param name="tokenSession.includeMethods">*</param>
224 <action name="userdelete" class="redback-admin-user-delete" method="confirm">
225 <result name="input">/WEB-INF/jsp/redback/admin/userDelete.jsp</result>
226 <result name="error" type="redirectAction">userlist</result>
227 <result name="success" type="redirectAction">userlist</result>
228 <result name="cancel" type="redirectAction">userlist</result>
229 <interceptor-ref name="securedStack">
230 <param name="tokenSession.includeMethods">*</param>
234 <!-- ==== RBAC Actions ========================================== -->
236 <!-- This action is meant to be embedded within the User Edit action output jsp.
237 It is injected using the <ww:action> taglib -->
238 <action name="assignments" class="redback-assignments" method="show">
239 <interceptor-ref name="securedStack"/>
240 <result name="input">/WEB-INF/jsp/redback/admin/assignments.jsp</result>
241 <result name="error">/WEB-INF/jsp/redback/include/error.jsp</result>
242 <result name="success">/WEB-INF/jsp/redback/admin/assignments.jsp</result>
245 <action name="addRolesToUser" class="redback-assignments" method="edituser">
246 <result name="success" type="redirectAction">userlist</result>
247 <interceptor-ref name="securedStack">
248 <param name="tokenSession.includeMethods">*</param>
252 <action name="removeRolesFromUser" class="redback-assignments" method="edituser">
253 <result name="success" type="redirectAction">userlist</result>
256 <action name="rolecreate" class="redback-role-create" method="show">
257 <result name="input">/WEB-INF/jsp/redback/admin/roleCreate.jsp</result>
258 <result name="error">/WEB-INF/jsp/redback/admin/roleCreate.jsp</result>
259 <result name="success" type="redirectAction">userlist</result>
260 <interceptor-ref name="securedStack">
261 <param name="tokenSession.includeMethods">*</param>
265 <action name="role" class="redback-role-edit" method="input">
266 <result name="input">/WEB-INF/jsp/redback/admin/role.jsp</result>
267 <result name="error">/WEB-INF/jsp/redback/admin/role.jsp</result>
268 <result name="success" type="redirectAction">roles</result>
271 <action name="roleedit" class="redback-role-edit" method="edit">
272 <result name="input">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
273 <result name="error">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
274 <result name="success" type="redirectAction">roles</result>
277 <action name="rolesave" class="redback-role-edit" method="save">
278 <result name="input">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
279 <result name="error">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
280 <result name="success" type="redirectAction">roles</result>
281 <interceptor-ref name="securedStack">
282 <param name="tokenSession.includeMethods">*</param>
286 <action name="roleusersadd" class="redback-role-edit" method="addUsers">
287 <result name="input">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
288 <result name="error">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
289 <result name="success">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
290 <interceptor-ref name="securedStack">
291 <param name="tokenSession.includeMethods">*</param>
295 <action name="roleusersremove" class="redback-role-edit" method="removeUsers">
296 <result name="input">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
297 <result name="error">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
298 <result name="success">/WEB-INF/jsp/redback/admin/roleEdit.jsp</result>
299 <interceptor-ref name="securedStack">
300 <param name="tokenSession.includeMethods">*</param>
304 <action name="roleSummary" class="redback-roles" method="list">
305 <result name="list">/WEB-INF/jsp/redback/admin/roleSummary.jsp</result>
308 <action name="roles" class="redback-roles" method="list">
309 <result name="list">/WEB-INF/jsp/redback/admin/roleList.jsp</result>
312 <action name="permissions" class="redback-permissions" method="list">
313 <result name="list">/WEB-INF/jsp/redback/admin/permissionList.jsp</result>
316 <action name="operations" class="redback-operations" method="list">
317 <result name="list">/WEB-INF/jsp/redback/admin/operationList.jsp</result>
320 <action name="resources" class="redback-resources" method="list">
321 <result name="list">/WEB-INF/jsp/redback/admin/resourceList.jsp</result>
324 <action name="roleModel" class="redback-role-model" method="view">
325 <result name="success">/WEB-INF/jsp/redback/admin/roleModel.jsp</result>
329 Backup Restore actions
332 <action name="backupRestore" class="backup-restore" method="view">
333 <result>/WEB-INF/jsp/redback/admin/backupRestore.jsp</result>
336 <action name="backup" class="backup-restore" method="backup">
337 <result name="custom_error">/WEB-INF/jsp/redback/admin/backupRestore.jsp</result>
338 <result type="redirectAction">backupRestore</result>
341 <action name="restore" class="backup-restore" method="restore">
342 <result name="custom_error">/WEB-INF/jsp/redback/admin/backupRestore.jsp</result>
343 <result name="success" type="redirectAction">backupRestore</result>