Commit Graph

668 Commits

Author SHA1 Message Date
tsschmidt ff186d0b15 Extract inlined CAS attributes in protocol 3 Ticket Validator 2019-01-23 08:26:35 -08:00
Misagh Moayyed 5c83981d9f
Merge pull request #252 from alterdego/master
Fixed typos in README.md
2019-01-14 06:53:40 -06:00
Document Doctor 48e6950f37 Fixed typos in README.md 2019-01-12 01:18:14 -05:00
Document Doctor 9e769dd0b5 Fixed typos in README.md 2019-01-11 21:42:00 -05:00
Dmitriy Kopylenko 574b74fa64 [maven-release-plugin] prepare for next development iteration 2018-11-01 10:32:59 -04:00
Dmitriy Kopylenko cbf97a45c0 [maven-release-plugin] prepare release cas-client-3.5.1 2018-11-01 10:32:53 -04:00
Misagh Moayyed fe25e1ce95
Update pom.xml 2018-10-20 23:08:22 +03:30
Misagh Moayyed 82c21161b9
Merge pull request #248 from SmithJosh/respect-path-in-servername-config
Include serverName path when constructing service url
2018-10-10 09:52:17 +03:30
Joshua Smith 6dbfdd2142 Include serverName path when constructing service url
Commit be2a641 introduced a bug which overwrites the serverName path component
when constructing service urls. This makes it impossible to deploy a CAS-
protected application behind a reverse proxy with a path prefix.

Now, the path from the incoming request is appended to the serverName path
instead of overwriting it.
2018-10-02 13:29:30 -07:00
Misagh Moayyed ee9dcc61cd
Merge pull request #239 from mattdrees/issue-210-preserve-entity-stream-for-non-logout-requests
Add option to prevent entity stream consumption
2018-07-25 23:47:05 +04:30
Matt Drees a61f7f28d1 Rename logoutPath to logoutCallbackPath 2018-07-25 13:07:29 -06:00
Misagh Moayyed 34ce26d0e6
Merge branch 'master' into issue-210-preserve-entity-stream-for-non-logout-requests 2018-07-25 10:25:51 +04:30
Misagh Moayyed a408179e30
Merge pull request #241 from mattdrees/support-prefix-config-for-authentication-filter
Support casServerUrlPrefix config option for AuthenticationFilter
2018-07-25 10:24:35 +04:30
Matt Drees 6e5be5b2db Tweak logoutPath docs 2018-07-24 16:08:48 -06:00
Matt Drees f59544c14b Stop using "matches" terminology 2018-07-24 16:07:44 -06:00
Matt Drees f915f559e8 Move utility method to CommonUtils 2018-07-24 15:19:01 -06:00
Matt Drees 5253d26444 Add option to prevent entity stream consumption
If someone's app cannot handle the SingleSignOutFilter's consumption of entity streams
(via a `request.getParameter()` call) on all requests,
they can use this option in conjunction with setting up a service logout URL at the CAS server.
The filter will now only consume the stream on requests to this path.

Fixes https://github.com/apereo/java-cas-client/issues/210.
2018-07-24 15:19:00 -06:00
Matt Drees 296b1fc3ef Support casServerUrlPrefix config option
`casServerUrlPrefix` is used for validation and single logout,
but before this commit it couldn't be used by the auth filter.
As a result, web.xml needed to (for the typical usecase)
contain at least two references to the cas server.

Now, only one context init-param reference is necessary,
as long as the login page is hosted at {prefix}/login
(which seems to be mandated by cas protocol spec).
2018-07-24 15:18:24 -06:00
Misagh Moayyed 1e9b356c9e
Merge pull request #178 from jalios/master
Fix #177 Every other request incorrectly gatewayed
2018-07-25 00:24:13 +04:30
Misagh Moayyed f06ba58201
Merge pull request #240 from mattdrees/fix-race-condition-in-http-server-tests
Fix race condition in PublicTestHttpServer tests
2018-07-25 00:22:57 +04:30
Matt Drees 0ad8e50809 Fix race condition in PublicTestHttpServer tests
The previous code assumed the server would start listening on the socket before tests ran, but didn't enforce this.
2018-07-24 11:29:25 -06:00
Misagh Moayyed 2af0d7d13c
fix tests 2018-07-17 11:50:10 +04:30
Misagh Moayyed 097bd599f0
fix tests 2018-07-17 11:42:41 +04:30
Misagh Moayyed d263e9958b
fix tests; adjust log levels for tests 2018-07-17 11:33:03 +04:30
Misagh Moayyed 1db5264baf
Rename stale.yml to .github/stale.yml 2018-07-17 11:08:37 +04:30
Misagh Moayyed d88b96a4c6
Create stale.yml 2018-06-08 10:48:49 -07:00
Misagh Moayyed bb10b6402f
Merge pull request #231 from Unicon/urlenc-queryparams
Handle un-encoded query strings in url parameters as embedded query strings
2018-03-08 15:58:35 +01:00
Misagh Moayyed ab7ce4e453
Update .travis.yml 2018-02-02 20:15:20 +01:00
Misagh Moayyed 0ce7f88747
Update .travis.yml 2018-01-31 21:48:55 +03:30
Misagh Moayyed f96fc84e28
handle un-encoded query strings in url parameters 2018-01-31 14:11:00 +03:30
Dmitriy Kopylenko 3e43a606c9 [maven-release-plugin] prepare for next development iteration 2018-01-12 11:56:32 -05:00
Dmitriy Kopylenko 43c7d1da8d [maven-release-plugin] prepare release cas-client-3.5.0 2018-01-12 11:56:28 -05:00
Dmitriy Kopylenko e7c00ea7ef prepare for the release 2018-01-12 11:46:12 -05:00
Dmitriy Kopylenko daa413db4d Polishing 2018-01-11 10:41:28 -05:00
Misagh Moayyed 7e866d9170 Merge pull request #209 from tkd-yas/master
Fix missing parameter key in service url (#208)
2017-10-06 04:31:21 -07:00
Misagh Moayyed d9997452dc Merge pull request #220 from mmoayyed/tomcat85x
Add support for tomcat 8.5.x
2017-10-06 04:30:25 -07:00
Misagh Moayyed c2a75e9966 Fix travis URLs: point to apereo rather than jasig 2017-07-11 16:58:14 -07:00
Misagh Moayyed 4fc3f42619
updated docs 2017-07-06 14:06:24 -07:00
Misagh Moayyed e3112f9629
Add support for tomcat 8.5.x 2017-07-06 14:01:21 -07:00
Scott aee4676272 Merge pull request #213 from lxbzmy/patch-1
Add JIRA Rest API support
2017-06-21 23:20:17 -04:00
Misagh Moayyed 9f48e75394
Fixed logging issue; returning null in case principal cannot be determined 2017-06-20 09:21:04 -07:00
Misagh Moayyed 544939ef52 Merge pull request #188 from eghm/master
Log an error message if CAS principal has no corresponding Confluence principal
2017-06-20 09:18:46 -07:00
Misagh Moayyed 970a0f5db9 Merge pull request #212 from mmoayyed/json-validator
New Json ticket validator to accept CAS responses in JSON.
2017-06-20 09:16:37 -07:00
Scott 9203f55b68 Merge pull request #214 from hdeadman/master
Improve error logging when getting response from CAS server fails
2017-06-02 12:38:55 -04:00
Hal Deadman ec61628d15 Improve error logging when getting response fails 2017-06-02 10:59:16 -04:00
Misagh Moayyed 7f2dae573c Merge pull request #156 from joeschweitzer/master
Return existing user if session is already authenticated
2017-06-01 21:06:42 -04:00
Misagh Moayyed 3bb2494ea2
Apply changes after code review by @serac 2017-06-01 21:03:51 -04:00
Alex Lei 雷 06b6b0c718 Add JIRA Rest API support
new JIRA 6 has rest api begin with url /rest when I use cas authentication filter which skip filter /rest ,there will be thrown exception:

java.lang.NullPointerException
    at com.atlassian.jira.security.login.JiraSeraphAuthenticator.getUserFromBasicAuthentication(JiraSeraphAuthenticator.java:149) 
    at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:339) [atlassian-seraph-3.0.3.jar:?]
    at org.jasig.cas.client.integration.atlassian.Jira44CasAuthenticator.getUser(Jira44CasAuthenticator.java:76) [cas-client-integration-atlassian-3.4.1.jar:3.4.1] 
    at com.atlassian.seraph.auth.AbstractAuthenticator.getUser(AbstractAuthenticator.java:45) [atlassian-seraph-3.0.3.jar:?]
    at com.atlassian.seraph.filter.BaseLoginFilter$SecurityHttpRequestWrapper.getUserPrincipal(BaseLoginFilter.java:238) [atlassian-seraph-3.0.3.jar:?]
    at com.atlassian.seraph.filter.BaseLoginFilter$SecurityHttpRequestWrapper.getRemoteUser(BaseLoginFilter.java:225) [atlassian-seraph-3.0.3.jar:?]
    at javax.servlet.http.HttpServletRequestWrapper.getRemoteUser(HttpServletRequestWrapper.java:168) [servlet-api.jar:?]
    at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.preFilterCallStep(AccessLogFilter.java:175) [classes/:?]
    at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:86) [classes/:?]
    at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:78) [classes/:?]

After hard debug work I found key program flow different from default authenitcator  :

in `com.atlassian.seraph.filter.BaseLoginFilter#SecurityHttpRequestWrapper#getUserPrincipal()`

public Principal getUserPrincipal() {
            return BaseLoginFilter.this.getAuthenticator().getClass().isAnnotationPresent(AuthenticationContextAwareAuthenticator.class)?BaseLoginFilter.this.getAuthenticationContext().getUser():BaseLoginFilter.this.getAuthenticator().getUser(this.delegateHttpServletRequest);
        }

The `AuthenticationContextAwareAuthenticator` annotation cause different flow.

So, add `AuthenticationContextAwareAuthenticator` annotation can slow problem.
2017-05-27 11:13:09 +08:00
Misagh Moayyed 8e468933ee Merge pull request #124 from leleuj/casc-121
Upgrade to Java 6
2017-05-24 09:23:51 -04:00
leleuj c0ded8f897 merge with master 2017-05-24 08:36:57 +02:00