|
| 1 | +<security-config> |
| 2 | + <parameters> |
| 3 | + <init-param> |
| 4 | + <!-- |
| 5 | + The login URL to redirect to when the user tries to access a protected resource (rather than clicking on |
| 6 | + an explicit login link). Most of the time, this will be the same value as 'link.login.url'. |
| 7 | + - if the URL is absolute (contains '://'), then redirect that URL (for SSO applications) |
| 8 | + - else the context path will be prepended to this URL |
| 9 | +
|
| 10 | + If '${originalurl}' is present in the URL, it will be replaced with the URL that the user requested. |
| 11 | + This gives SSO login pages the chance to redirect to the original page |
| 12 | +
|
| 13 | + '${pageCaps}' should be supported accordingly to com.atlassian.sal.api.page.PageCapability |
| 14 | +
|
| 15 | + '${userRole}' when specified, should cause logout after login to an user with privileges lesser than requested |
| 16 | + --> |
| 17 | + <param-name>login.url</param-name> |
| 18 | + <param-value>/login.jsp?permissionViolation=true&os_destination=${originalurl}&page_caps=${pageCaps}&user_role=${userRole}</param-value> |
| 19 | + <!--<param-value>http://sso.mycompany.com/login?redirectTo=${originalurl}</param-value>--> |
| 20 | + </init-param> |
| 21 | + <init-param> |
| 22 | + <!-- |
| 23 | + the URL to redirect to when the user explicitly clicks on a login link (rather than being redirected after |
| 24 | + trying to access a protected resource). Most of the time, this will be the same value as 'login.url'. |
| 25 | + - same properties as login.url above |
| 26 | + --> |
| 27 | + <param-name>link.login.url</param-name> |
| 28 | + <param-value>/login.jsp?os_destination=${originalurl}</param-value> |
| 29 | + <!--<param-value>/secure/Dashboard.jspa?os_destination=${originalurl}</param-value>--> |
| 30 | + <!--<param-value>http://sso.mycompany.com/login?redirectTo=${originalurl}</param-value>--> |
| 31 | + </init-param> |
| 32 | + <init-param> |
| 33 | + <!-- URL for logging out. |
| 34 | + - If relative, Seraph just redirects to this URL, which is responsible for calling Authenticator.logout(). |
| 35 | + - If absolute (eg. SSO applications), Seraph calls Authenticator.logout() and redirects to the URL |
| 36 | + --> |
| 37 | + <param-name>logout.url</param-name> |
| 38 | + <param-value>/secure/Logout!default.jspa</param-value> |
| 39 | + <!--<param-value>http://sso.mycompany.com/logout</param-value>--> |
| 40 | + </init-param> |
| 41 | + <!-- |
| 42 | + The path to *forward* to when the user tries to POST to a protected resource (rather than clicking on |
| 43 | + an explicit login link). Note that this is done using a servlet FORWARD, not a redirect. Information |
| 44 | + about the original request can be gotten from the javax.servlet.forward.* request attributes. |
| 45 | +
|
| 46 | + At this point you will probably want to save the user's POST params so he can log in again and retry |
| 47 | + the POST. |
| 48 | +
|
| 49 | + Defaults to undefined, in which case Seraph will just do a redirect instead of a FORWARD. |
| 50 | + --> |
| 51 | + <init-param> |
| 52 | + <param-name>login.forward.path</param-name> |
| 53 | + <param-value>/secure/XsrfErrorAction.jspa</param-value> |
| 54 | + </init-param> |
| 55 | + <!-- The key that the original URL is stored with in the session --> |
| 56 | + <init-param> |
| 57 | + <param-name>original.url.key</param-name> |
| 58 | + <param-value>os_security_originalurl</param-value> |
| 59 | + </init-param> |
| 60 | + <init-param> |
| 61 | + <param-name>login.cookie.key</param-name> |
| 62 | + <param-value>seraph.rememberme.cookie</param-value> |
| 63 | + </init-param> |
| 64 | + <!-- This property sets the default remember me cookie max age in seconds. It is currently set to 2 weeks --> |
| 65 | + <init-param> |
| 66 | + <param-name>autologin.cookie.age</param-name> |
| 67 | + <param-value>1209600</param-value> |
| 68 | + </init-param> |
| 69 | + <!-- Basic Authentication can be enabled by passing the authentication type as a configurable url parameter. |
| 70 | + With this example, you will need to pass http://mycompany.com/anypage?os_authType=basic in the url to enable Basic Authentication --> |
| 71 | + <init-param> |
| 72 | + <param-name>authentication.type</param-name> |
| 73 | + <param-value>os_authType</param-value> |
| 74 | + </init-param> |
| 75 | + <!-- If this parameter is set to true, the cookie will never be set secure. This is useful if you're logging |
| 76 | + into JIRA via https, but want to browse JIRA over http. This flag will ensure that the remember me option |
| 77 | + works correctly. |
| 78 | + <init-param> |
| 79 | + <param-name>insecure.cookie</param-name> |
| 80 | + <param-value>true</param-value> |
| 81 | + </init-param> --> |
| 82 | + |
| 83 | + <init-param> |
| 84 | + <param-name>invalidate.session.on.login</param-name> |
| 85 | + <param-value>true</param-value> |
| 86 | + </init-param> |
| 87 | + <init-param> |
| 88 | + <param-name>invalidate.session.exclude.list</param-name> |
| 89 | + <param-value>ASESSIONID,jira.websudo.timestamp,jira.user.project.admin</param-value> |
| 90 | + </init-param> |
| 91 | + </parameters> |
| 92 | + |
| 93 | + <!-- CROWD:START - If enabling Crowd SSO integration uncomment the following SSOSeraphAuthenticator and comment out the JiraSeraphAuthenticator below --> |
| 94 | + <authenticator class="com.atlassian.jira.security.login.SSOSeraphAuthenticator"/> |
| 95 | + <!-- CROWD:END --> |
| 96 | + |
| 97 | + <!-- CROWD:START - The authenticator below here will need to be commented out for Crowd SSO integration --> |
| 98 | +<!-- <authenticator class="com.atlassian.jira.security.login.JiraSeraphAuthenticator"/> --> |
| 99 | + <!-- CROWD:END --> |
| 100 | + |
| 101 | + <!-- NB: the URL to redirect to is now specified by login.url above --> |
| 102 | + <services> |
| 103 | + <service class="com.atlassian.jira.security.JiraPathService" /> |
| 104 | + |
| 105 | + <service class="com.atlassian.seraph.service.WebworkService"> |
| 106 | + <init-param> |
| 107 | + <param-name>action.extension</param-name> |
| 108 | + <param-value>jspa</param-value> |
| 109 | + </init-param> |
| 110 | + </service> |
| 111 | + |
| 112 | + <service class="com.atlassian.jira.plugin.webwork.JiraSeraphSecurityService" /> |
| 113 | + </services> |
| 114 | + |
| 115 | + <rolemapper class="com.atlassian.jira.security.JiraRoleMapper"/> |
| 116 | + |
| 117 | + <elevatedsecurityguard class="com.atlassian.jira.security.login.JiraElevatedSecurityGuard"/> |
| 118 | + |
| 119 | + <interceptors> |
| 120 | + <interceptor class="com.atlassian.jira.web.filters.JiraLoginInterceptor" /> |
| 121 | + </interceptors> |
| 122 | +</security-config> |
0 commit comments