Problem
A user is being prompted to enter a password before being able to access the user settings page.
Prerequisites
- Terraform Enterprise (TFE) is version
202309-1
-
Terraform Enterprise (TFE) is version
202310-1
with the TFE application settingconsolidated_services_enabled
set to a value of0
Cause
An authentication feature specific to Terraform Cloud was erroneously enabled within these builds of Terraform Enterprise.
Solutions
- If you are using TFE version
202309-1
:- Upgrade to version
202310-1
of TFE
- Upgrade to version
- If you are using TFE version
202310-1
with the TFE application settingconsolidated_services_enabled
set to a value of0
:- Set the value for
consolidated_services_enabled
to1
, or upgrade to202311-1
when available
- Set the value for
Workaround for TFE admins
For users who do not know their passwords, or were initially created through SSO:
If consolidated_services_enabled
is set to or using it's default value of 1
:
- Have the user provide you their TFE username
- This by default is whatever exists to the left of the @ symbol in their email address when the user is automatically created through SSO
- SSH into one of your TFE nodes, if multiple
- Execute this command to start an interactive session within the
terraform-enterprise
container:docker exec -it terraform-enterprise bash
- Execute this command to connect to the Rails console of TFE:
tfectl support console
- Type
yes
to continue
- Type
- Replace CHANGE_ME with the user's username, then execute this command:
u = User.find_by_username("CHANGE_ME")
- Replace CHANGE_ME with the new password the user will use, then execute this command:
u.password = 'CHANGE_ME'
- Execute this command to save the change:
u.save!
- Execute this command to exit the session, and to have other save functions enacted:
exit
- Have the user confirm that they can use the new password when prompted for it
If consolidated_services_enabled
is set to or using it's default value of 0
:
- Have the user provide you their TFE username
- This by default is whatever exists to the left of the @ symbol in their email address when the user is automatically created through SSO
- SSH into one of your TFE nodes, if multiple
- Execute this command to connect to the Rails console:
sudo docker exec -it tfe-atlas /usr/bin/init.sh /app/scripts/wait-for-token -- bash -ic 'cd /app && bin/rails c'
- Replace CHANGE_ME with the user's username, then execute this command:
u = User.find_by_username("CHANGE_ME")
- Replace CHANGE_ME with the new password the user will use, then execute this command:
u.password = 'CHANGE_ME'
- Execute this command to save the change:
u.save!
- Execute this command to exit the session, and to have other save functions enacted:
exit
- Have the user confirm that they can use the new password when prompted for it