Skip to content

Conversation

@tvernum
Copy link
Contributor

@tvernum tvernum commented Nov 5, 2018

For some time, the PutUser REST API has supported storing a pre-hashed
password for a user. The change adds validation and tests around that
feature.

Relates: #34729

For some time, the PutUser REST API has supported storing a pre-hashed
password for a user. The change adds validation and tests around that
feature so that it can be documented & officially supported.
@tvernum tvernum added >enhancement v7.0.0 :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.6.0 labels Nov 5, 2018
@tvernum tvernum requested review from jaymode and jkakavas November 5, 2018 01:06
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@tvernum
Copy link
Contributor Author

tvernum commented Nov 5, 2018

I will raise follow up PRs for

  • adding this to the APi docs
  • adding this to the HLRC.

@tvernum
Copy link
Contributor Author

tvernum commented Nov 5, 2018

@elasticmachine test this please

I think the CI failure will be resolved by 81daf4c

Copy link
Member

@jaymode jaymode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think the commit message and title of this pr needs s/password_user/password_hash

@tvernum tvernum changed the title Formal support for "password_user" in Put User Formal support for "password_hash" in Put User Nov 8, 2018
@tvernum
Copy link
Contributor Author

tvernum commented Nov 8, 2018

@jkakavas Ping. Do you want to review? I'd like to merge once I can get CI to pass.

Copy link
Contributor

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly worried that we don't deal well enough with a PutUser request that has both a password and a password_hash parameter. As is, whatever is last in the parameters order will be the actual user password.
Since PutUserRequest only knows about passwordHash, we can't do the validation there but I was wondering if we should validate this in PutRequestBuilder and throw a friendly please fix your input message, and add an accompanying test for it.
Also, just a reminder to update API Docs also

@tvernum
Copy link
Contributor Author

tvernum commented Nov 12, 2018

@jkakavas I've added a check for setting the password_hash twice - can you review again?

Copy link
Contributor

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tvernum tvernum merged commit 231f6c1 into elastic:master Nov 14, 2018
tvernum added a commit to tvernum/elasticsearch that referenced this pull request Nov 15, 2018
PR elastic#35242 formalised support for the password_hash field in the body
of the Put User security API.
Since this field is now validated and tested, it can also be
documented.

The Put User API also supports a "refresh" query parameter that was
not documented. This commit adds it to the docs.
tvernum added a commit to tvernum/elasticsearch that referenced this pull request Nov 15, 2018
Update PutUserRequest to support password_hash (see: elastic#35242)

This also updates the documentation to bring it in line with our more
recent approach to HLRC docs.
@tvernum tvernum mentioned this pull request Nov 16, 2018
tvernum added a commit that referenced this pull request Nov 16, 2018
For some time, the PutUser REST API has supported storing a pre-hashed
password for a user. The change adds validation and tests around that
feature so that it can be documented & officially supported.

It also prevents the request from containing both a "password" and a "password_hash".
tvernum added a commit that referenced this pull request Nov 20, 2018
PR #35242 formalised support for the password_hash field in the body
of the Put User security API.
Since this field is now validated and tested, it can also be
documented.

The Put User API also supports a "refresh" query parameter that was
not documented. This commit adds it to the docs.
tvernum added a commit that referenced this pull request Nov 21, 2018
PR #35242 formalised support for the password_hash field in the body
of the Put User security API.
Since this field is now validated and tested, it can also be
documented.

The Put User API also supports a "refresh" query parameter that was
not documented. This commit adds it to the docs.
tvernum added a commit that referenced this pull request Nov 27, 2018
Update PutUserRequest to support password_hash (see: #35242)

This also updates the documentation to bring it in line with our more
recent approach to HLRC docs.
tvernum added a commit that referenced this pull request Nov 29, 2018
Update PutUserRequest to support password_hash (see: #35242)

This also updates the documentation to bring it in line with our more
recent approach to HLRC docs.
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.6.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants