SK-CERT / Taranis-NG

Taranis NG is an OSINT gathering and analysis tool for CSIRT teams and organisations. It allows team-to-team collaboration, and contains a user portal for simple self asset management. Taranis NG was developed by SK-CERT with a help from wide CSIRT community.
European Union Public License 1.2
98 stars 21 forks source link

Login after deployment #109

Open Neodyn opened 1 year ago

Neodyn commented 1 year ago

Login is not possible with the provided default credentials: The default credentials are user / user and admin / admin

Also edit of the existing account "admin" with sudo docker exec -it taranis-ng-core-1 python manage.py account -e --username admin --password admin does not work.

dodancs commented 1 year ago

Hi @Neodyn,

This is a duplicate of #92 . Nevertheless, the default user accounts are supposed to be added by the following migration ac311a84207a_added_default_user_accounts.py.

Can you please provide a dump of your database for us to verify that all migrations have been run? To do this, simply run the following command and attach the resulting export.sql file to a comment under this Issue:

docker exec taranis-ng-database-1 pg_dump --data-only -U taranis-ng -d taranis-ng > export.sql

If you are unable to run this command, it probably means the name of the container is different, so you can find the name by doing docker ps -a | grep taranis and find a container name that has the word database in it: taranis-ng_database_1. Then replace the original name in the previous command with it like so:

docker exec <CONTAINER_NAME> pg_dump --data-only -U taranis-ng -d taranis-ng > export.sql

====

docker exec taranis-ng_database_1 pg_dump --data-only -U taranis-ng -d taranis-ng > export.sql

Thank you.

Neodyn commented 1 year ago

export.txt

dodancs commented 1 year ago

export.txt

I can see that the user accounts are present in your database (both the admin and user usernames). All of the migrations have also been run.

Can you please provide us with the logs from all of the containers while you attempt to log in? You can achieve this with the following commands:

docker-compose -f docker/docker-compose.yml down --remove # this should remove all containers, also clear logs
docker-compose -f docker/docker-compose.yml down # if the above command does not work, try without --remove
docker-compose -f docker/docker-compose.yml up -d # bring the container back up
# wait for TNG to boot up
# try to log in with default credentials, eg. admin/admin or user/user
docker-compose -f docker/docker-compose.yml logs > logs.txt # export the logs for all containers
Neodyn commented 1 year ago

Thank you for your support. logs.txt

milankowww commented 1 year ago

This issue went quitet for some time. Let me pick it up:

when you do docker inspect taranis-ng-gui-1 focus on these env variables: "Env": [ "VUE_APP_TARANIS_NG_CORE_API=https://localhost:4443/api/v1", "VUE_APP_TARANIS_NG_CORE_SSE=https://localhost:4443/sse", "VUE_APP_TARANIS_NG_URL=https://localhost:4443",

you can change their values by editing docker/.env and recreating the containers.

This is how it looks like on my side, for instance. You need to change localhost to your intended hostname.

# Web host and ports
TARANIS_NG_HOSTNAME=localhost
TARANIS_NG_HTTPS_PORT=4443
TARANIS_NG_HTTP_PORT=8080
TARANIS_NG_HTTPS_URI=https://localhost:4443
StefC93 commented 1 year ago

(i know it's an old issue but it's still open so it might still be helpful, if not for others)

@Neodyn. I had this same issue and fixed it with the following steps: