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

[Security] Use refresh token for any access token error with 401 status code and re-initiate SAML handshake for any refresh token error with 400 status code #33646

Closed
azasypkin opened this issue Mar 21, 2019 · 1 comment · Fixed by #33777
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@azasypkin
Copy link
Member

azasypkin commented Mar 21, 2019

Currently Kibana tries to use refresh token only if it gets access token error with token expired description and also automatically re-initiates SAML handshake only if refreshing fails with one of these errors, otherwise we just return error to the user:

  • 400: token has already been refreshed
  • 400: refresh token is expired

Based on conversations in elastic/elasticsearch#39808 (comment) and #22905 (comment) it seems it'd make sense to NOT analyze specific reason (error_description or reason fields of the error) and try to use refresh token for any access token error with 401 status code and re-initiate SAML handshake for any refresh token error with 400 status code.

Depends on elastic/elasticsearch#38866 (we added a special handling of 500 error with a specific error message that we'll get rid of once ES issue is resolved)

Fixes #22905

@azasypkin azasypkin added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication labels Mar 21, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@azasypkin azasypkin changed the title [Security] Re-initiate SAML handshake for any refresh token error with 400 status code [Security] Use refresh token for any access token error with 401 status code and re-initiate SAML handshake for any refresh token error with 400 status code Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
2 participants