Instructions

How to reset Xray's admin password?

AuthorFullName__c
Maayan Amrani
articleNumber
000004428
ft:sourceType
Salesforce
FirstPublishedDate
2019-03-10T15:16:07Z
lastModifiedDate
2024-03-10T07:46:09Z
VersionNumber
6
In order to reset the password for the admin user in Xray (when Artifactory is configured as the Authentication Provider), you need to connect to the MongoDB and manually change it.

Docker installation:

1 - Connect to mongoDB container: docker exec -it <container ID> bash

2 - Connect to mongo DataBase: mongo -u xray --authenticationDatabase xray --authenticationMechanism SCRAM-SHA-1 -p password (when using the default DB (not externalized DB) the schema name is 'xray')

3 - Switch to Xray DB : use xray

4 - Change admin password : db.getCollection('users').update({name: "admin"},{$set: {password:"SaltedPassword"}});

The default Xray Admin password is this Salted Password: ""qCjYNYARDMbIOcYf6fAJYEI04vAeeJjSy/WIfNv1LV0=""

5 - Open Xray UI and verify you can login with user: ’admin' , password: <Default_xray_Admin_pass>

Non-docker installation:

1 - Connect to mongo DB

2 - Switch to Xray DB : use xray

3 - Change admin password : db.getCollection('users').update({name: "admin"},{$set: {password:"SaltedPassword"}});

4 - Open Xray UI and verify you can login with user: ’admin' , password: ’updatedPassword’