-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
In Preparation, mentions:
echo "PG_PASS=$(openssl rand -base64 36)" >> .env
echo "AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60)" >> .env
But command openssl rand generates a newline each X bytes. This generate secrets like:
AUTHENTIK_SECRET_KEY=6UWXLq1/iznyqf0lniVUsseD5XPtpOFi7Bz7fNPOnEIqQbT8mOcGYwVUmF7DYm+W
8Kx/yO69QOPvuts3
Anything after newline will not be contained in the AUTHENTIK_SECRET_KEY.
In this example it will even show a message error because / is not valid in variable name:
$ sudo docker compose pull
[sudo] password for user:
failed to read /home/user/Downloads/.env: line 3: unexpected character "/" in variable name "8Kx/yO69QOPvuts3"
To Reproduce
Steps to reproduce the behavior:
- Run
openssl rand -base64 60and check if there is a newline - Make sure that second line has a character that is not valid in variable name but valid variable value
docker compose pull- Docker compose will warn you that variable name is not valid
Expected behavior
AUTHENTIK_SECRET_KEY being an one-line value.
Screenshots
None
Logs
None
Version and Deployment (please complete the following information):
- authentik version: 2024.4.1
- Deployment: docker-compose
Additional context
I thought about quoting but this would make newline being include and I'm not sure if this is desired. Maybe is better to do:
AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d \n)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working