-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Change password API authenticating with a bearer token #48752
Comments
Pinging @elastic/es-security (:Security/Authentication) |
@original-brownbear I guess this was closed by mistake:) |
Same as elastic#44444 but for the coordinator tests. Closes elastic#48752
Yea, sorry about that! |
@azasypkin I went ahead and opened #49694 I feel that the proper way forward with this is option 1 from above where we disallow password change requests in elasticsearch when the user authenticates with a bearer token. Thinking through option 2, it feels like that would be a big workaround where we would in principal perform authentication of the request using a password that is passed in the request body which is rather strange for an API. Let me know what you think |
Thanks for explaining, I think I understand where it gets complicated for ES internally, but let me share my thoughts on that as well. Option 1 feels like a workaround from the consumer (Kibana) point of view since we have a session with authentication information ( Is there a precedent maybe or I just look at it at the wrong angle?
I was thinking about it (I admit, very naively) as not authentication through request body parameter, but rather as enforcing of the API action specific requirement at the API action level 🙈 |
Honestly, this is not about throwing the problem over the fence or about washing ES hands clean of a possible non-simple solution implementation. The requirement we're trying to impose from the API perspective with requiring proof of the current password is that the caller of the API can at this time authenticate with the username and current password. Instead of using a bearer token that they might got 10 days ago and keep refreshing since, or even worse found in client-side log 10 mins ago. If Kibana was the only consumer of the API, I would think it would be fine if kibana guarantees that it will re-authenticate the user with the current password right before it issues a change password request and use that token as a Bearer token.
As such, I don't think that the current password is another API specific parameter in this case, but rather that an authentication based on the current password is required in order to call that API.
This is a rather unique case so the only precedent I can think of is the fact that we don't allow requests to the change password API when authenticating with an API Key. If you think it would be better to discuss this live, let's set up a short call for Monday and go over pros and cons of approaches and our thoughts about it ! |
I'm not sure if I agree with the reasoning completely but that's fine. If you all feel strongly about option 1, let's not spin our wheels here and see how this plays out 👍 |
Same as elastic#44444 but for the coordinator tests. Closes elastic#48752
We should disallow requests to Change Password API authenticated with a bearer token from our Token Service. The reasoning for this is that it is best practice from a security perspective to mandate the proof of knowledge of the current password at the time the password is changed.
Kibana ( ping @azasypkin ) needs to adjust for this change too when the Token authentication provider is in use. The two available options that we originally discussed :
The text was updated successfully, but these errors were encountered: