Problem
When a user attempts to access their user settings page in Terraform Enterprise, they are unexpectedly prompted to enter a password.
Prerequisites
This issue occurs in the following Terraform Enterprise (TFE) versions and configurations:
- TFE version
202309-1. - TFE version
202310-1with the application settingconsolidated_services_enabledset to0.
Cause
An authentication feature intended for HCP Terraform was erroneously enabled in these specific builds of Terraform Enterprise.
Solutions
The recommended solution is to upgrade your Terraform Enterprise instance. If an immediate upgrade is not possible, administrators can manually reset a user's password as a temporary workaround.
Solution 1: Upgrade Terraform Enterprise
Upgrade your instance to a version where the issue is resolved.
- If you are using TFE version
202309-1, upgrade to version202310-1or later. - If you are using TFE version
202310-1withconsolidated_services_enabledset to0, either set the value to1or upgrade to version202311-1or later.
Solution 2: Manually Reset the User's Password
This procedure allows a TFE administrator to reset the password for a user, including those created via SSO who may not have a password.
Note: The commands differ based on the value of the consolidated_services_enabled setting.
If consolidated_services_enabled is 1 (default)
- Obtain the user's TFE username.
- For users created via SSO, this is typically the part of their email address before the
@symbol.
- For users created via SSO, this is typically the part of their email address before the
- SSH into a TFE node.
-
Start an interactive shell session inside the
terraform-enterprisecontainer.$ docker exec -it terraform-enterprise bash
-
Connect to the TFE Rails console.
$ tfectl support console
Enter
yeswhen prompted to continue. -
Find the user account. Replace
CHANGE_MEwith the user's username.u = User.find_by_username("CHANGE_ME") -
Set the new password. Replace
CHANGE_MEwith a secure temporary password.u.password = 'CHANGE_ME'
-
Save the changes and exit the console.
u.save! exit
- Instruct the user to log in with the new password.
If consolidated_services_enabled is 0
- Obtain the user's TFE username.
- For users created via SSO, this is typically the part of their email address before the
@symbol.
- For users created via SSO, this is typically the part of their email address before the
- SSH into a TFE node.
-
Connect to the Rails console using the appropriate command for this configuration.
$ sudo docker exec -it tfe-atlas /usr/bin/init.sh /app/scripts/wait-for-token -- \ bash -ic 'cd /app && bin/rails c'
-
Find the user account. Replace
CHANGE_MEwith the user's username.u = User.find_by_username("CHANGE_ME") -
Set the new password. Replace
CHANGE_MEwith a secure temporary password.u.password = 'CHANGE_ME'
-
Save the changes and exit the console.
u.save! exit
- Instruct the user to log in with the new password.