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

CORS error when calling REST API with expired access token #3308

Closed
lorthirk opened this issue May 12, 2021 · 0 comments · Fixed by #3324
Closed

CORS error when calling REST API with expired access token #3308

lorthirk opened this issue May 12, 2021 · 0 comments · Fixed by #3324
Assignees
Labels
Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday

Comments

@lorthirk
Copy link

Describe the bug
CORS Filter should not return an error when the token is expired, but a valid HTTP 401 response code is expected. This is probably due to the Shiro Filter being called, and returning an error, before the CORS filter can act, or due to a CORS Filter error during the execution

To Reproduce
Steps to reproduce the behavior:

  1. Login with REST API and obtain an Access Token
  2. Let the Access Token expire
  3. Perform a REST API call after the token has expired
  4. See error

Expected behavior
An HTTP 401 response should be returned

Version of Kapua
1.4.4

Type of deployment
[x] Local Vagrant deployment
[x] Docker
[x] Openshift (in its variants)
[x] Others

Main component affected
[ ] Console (in case of console please report info on which browser you encountered the problem)
[x] REST API
[ ] Message Broker
[ ] - Others

@lorthirk lorthirk added Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday labels May 12, 2021
@lorthirk lorthirk self-assigned this May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant