Closed alegrey91 closed 3 months ago
When declaring users with rancher2_user, there is no option to ask the user to change their password on the next login like there is in the UI.
rancher2_user
Add the missing attribute in order to allow the user to force the reset of rancher users managed with the provider.
Setup a rancher instance from docker:
sudo docker run --privileged -it --rm -p 8080:80 -p 443:443 rancher/rancher
In order to test this new attribute I've used the following terraform script to ensure the new user had this attribute set:
resource "rancher2_user" "testuser" { name = "Test User" username = "testuser" password = "password12345" must_change_password = true enabled = true } # Assign global role bindings to the user (optional) resource "rancher2_global_role_binding" "new_user_role" { user_id = rancher2_user.testuser.id global_role_id = "user-base" }
Once terraform completed its run, you can login with the new created user testuser. Once logged in the UI will show the reset password page.
testuser
Issue: https://github.com/rancher/rancher/issues/45736
Problem
When declaring users with
rancher2_user
, there is no option to ask the user to change their password on the next login like there is in the UI.Solution
Add the missing attribute in order to allow the user to force the reset of rancher users managed with the provider.
Testing
Engineering Testing
Manual Testing
Setup a rancher instance from docker:
In order to test this new attribute I've used the following terraform script to ensure the new user had this attribute set:
Once terraform completed its run, you can login with the new created user
testuser
. Once logged in the UI will show the reset password page.Automated Testing
QA Testing Considerations
Regressions Considerations