Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Stale bearer token results in 400 #645

Open
dehora opened this issue May 8, 2017 · 1 comment
Open

Stale bearer token results in 400 #645

dehora opened this issue May 8, 2017 · 1 comment
Labels

Comments

@dehora
Copy link
Member

dehora commented May 8, 2017

When making a request to an upstream authorization server, the API returns 400 instead of indicating an authorization issue.

The response structure is also incorrect - the API definition defines Problem structures for all errors.

One way to reproduce this is to call the server with a stale bearer token.

Example response:

* upload completely sent off: 73 out of 73 bytes
< HTTP/1.1 400 Bad Request
< Server: Apache-Coyote/1.1
< X-Flow-Id: 4d0f0FTwhdXQtqYVYcneMgY5
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-Frame-Options: DENY
< Cache-Control: no-store
< Pragma: no-cache
< WWW-Authenticate: Bearer realm="oauth2-resource"
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Mon, 08 May 2017 08:43:35 GMT
< Connection: close
< 
{"error":"invalid_request","error_description":"Retrieving information to 'accessToken' failed."}
dehora added a commit to dehora/nakadi-java that referenced this issue May 15, 2017
The server doesn't return the correct response code or structure
for some auth issue. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.
dehora added a commit to dehora/nakadi-java that referenced this issue May 15, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.
dehora added a commit to dehora/nakadi-java that referenced this issue May 15, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.
dehora added a commit to dehora/nakadi-java that referenced this issue May 16, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.
@lmontrieux lmontrieux self-assigned this May 26, 2017
@lmontrieux lmontrieux added the bug label May 26, 2017
@lmontrieux lmontrieux removed their assignment May 29, 2017
@lmontrieux
Copy link
Contributor

Jira ticket ARUHA-602

dehora added a commit to dehora/nakadi-java that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
dehora added a commit to dehora/nakadi-java that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
dehora added a commit to dehora/nakadi-java that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
dehora added a commit to dehora/nakadi-java that referenced this issue Jun 3, 2017
dehora added a commit to dehora/nakadi-java that referenced this issue Jun 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants