Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mistyping password does not give Authentication Failed error. #8

Closed
jaybuff opened this issue Feb 19, 2015 · 4 comments
Closed

mistyping password does not give Authentication Failed error. #8

jaybuff opened this issue Feb 19, 2015 · 4 comments

Comments

@jaybuff
Copy link
Contributor

jaybuff commented Feb 19, 2015

Awesome, Jira gives you an HTTP 200 when you provide bad u/p:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store, no-transform
Content-Type: application/json;charset=UTF-8
Date: Thu, 19 Feb 2015 00:53:58 GMT
Server: Apache-Coyote/1.1
X-Arequestid: 53x17037965x1
X-Asen: SEN-2062203
X-Asessionid: 14tags9
X-Ausername: jaybuff
X-Content-Type-Options: nosniff
X-Seraph-Loginreason: AUTHENTICATION_DENIED

fd
{"self":"https://issues.apache.org/jira/rest/api/latest/user?username=jaybuff","name":"jaybuff","loginInfo":{"failedLoginCount":12,"loginCount":240,"lastFailedLoginTime":"2015-02-19T00:53:59.600+0000","previousLoginTime":"2015-02-19T00:09:15.895+0000"}}
0
@coryb
Copy link
Contributor

coryb commented Feb 19, 2015

Interesting, probably depends on auth type on the jira server. When I run jira login with a bogus password I get a 403 with X-Authentication-Denied-Reason header set.

I suppose we can look for 200's with X-Seraph-Loginreason: AUTHENTICATION_DENIED header.

-Cory

@jaybuff
Copy link
Contributor Author

jaybuff commented Feb 19, 2015

From https://confluence.atlassian.com/display/JIRA043/JIRA+REST+API+%28Alpha%29+Tutorial#JIRARESTAPI%28Alpha%29Tutorial-CAPTCHAs

When you get an error response from JIRA, you can check for the presence of an
X-Seraph-LoginReason header in the response, which will contain more information. A value of
AUTHENTICATION_DENIED means the application rejected the login without even checking the
password, which most commonly indicates that JIRA's CAPTCHA feature has been triggered.

coryb added a commit that referenced this issue Feb 19, 2015
@coryb
Copy link
Contributor

coryb commented Feb 19, 2015

cool, just updated the code to detect the header. Thanks.
-Cory

@coryb
Copy link
Contributor

coryb commented Sep 16, 2015

fixed this a while ago, closing.

@coryb coryb closed this as completed Sep 16, 2015
pdericson pushed a commit to pdericson/go-jira that referenced this issue Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants