Resetting the admin password for D1 or Conversion Service
If you forgot the password of the admin user and you cannot log in to D1 or Conversion Service, follow the procedures described on this page to reset the password.
You cannot simply edit the installation file and reset the password when the password is already persisted in the database.
You can reset the password of the admin user in one of the following ways:
- Reset the password by modifying the
configuration.json
file (no reinstallation is required) - Reset the password by modifying the
installation-settings.yaml
file (reinstallation is required)
Before you begin
- Encrypt a value that you are going to set as a new admin password. For this purpose, you can use the encrypt.sh script provided in your package. Copy the encrypted password to clipboard.
- Shut down the D1 or Conversion Service instance for which you forgot the password.
To reset the password in the configuration.json
If you do not want to reinstall the whole D1, follow the procedure below to reset the admin password. You will need access to the installation directory.
Open the installation directory where D1/Conversion Service is installed.
Open the
conf
folder.Open the
configuration.json
file in a text editor, and go to the the relevant part of the file wherebind-id
is set totribefire-admin-user
:{"_type": "com.braintribe.cartridge.common.processing.configuration.url.model.RegistryEntry", "_id": "0",
"bindId": "tribefire-admin-user",
"denotation": {"_type": "com.braintribe.model.user.User", "_id": "1",
"name": "admin",
"password": "${decrypt('FWnpV1EI0oMcpeMYCaHoFhBRUYBghnXSrw/hH43dkmSLSJI9qT2V/vXym1b/8zIYvalWVw==')}"
}Paste your encrypted value into the
password
property field. Save and close the file.Open the
tribefire.properties
file.Set
TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD=true
. This will enforce the newly set password to be used.Start the node again.
You should now be able to log in with the new password.
You cannot use TRIBEFIRE_AUTH_ADMIN_USERNAME
and TRIBEFIRE_AUTH_ADMIN_PASSWORD
properties in this case, because they are overridden by settings in the configuration.json
file.
To reset the password from the installation file
You can edit the admin user credentials inside the installation-settings.yaml
file used for installation, provided that you add the TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true"
property to the file. You need to re-install D1 for your changes to take effect.
Open your deployment package directory.
Open the installation
yaml
file. Paste your encrypted password into theADMIN_USER
section:# ** Admin User **
# Configures the credentials for the default admin user.
# If the user doesn't exist yet, it will be created and the password will be set as specified here.
# If the user already exists, nothing will be done, i.e. its password will NOT be changed!
predefinedComponents:
ADMIN_USER: !com.braintribe.model.user.User
# Admin user name
name: "admin"
# Admin user password. Replace "[ENCRYPTED_PASSWORD]" with the encrypted password, e.g. "${decrypt('HMuN/VXo5+L0vVQzuJe7bAOiBmeKzWluP+POb7zjkcLCnzgawUfWmZAIu9eIOfVAzEQn6Q==')}".
password: "${decrypt('7tykS+5v1dHkYfW+tAZHSxr/8VZiAh21dJMGyC4LIbbU8Ru5mv/8ugDCwVOj4wyti0roYg==')}"Add the
TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true"
property to the file.# ** Runtime Properties **
# Runtime properties are used to configure application specific settings. Which properties are available/required depends on the application.
# For the complete list of supported runtime properties refer to the documentation. However, all important/mandatory properties are listed below.
runtimeProperties:
##############################################################################
# Platform settings
##############################################################################
TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true"
# This enables support for encrypted passwords in this configuration file (don't change!)
TRIBEFIRE_SECURED_ENVIRONMENT: "true"Reinstall D1. You should now be able to log in with the new password.