diff --git a/.env.sample b/.env.sample index cda8f2a..f517e0c 100644 --- a/.env.sample +++ b/.env.sample @@ -1,7 +1,7 @@ TYPE=authentik TIMEOUT=900 ENABLE_AUTO_UPDATE=true -# POST_DEPLOY_CMDS="worker set_admin_pass|worker apply_blueprints|worker add_applications" +# POST_DEPLOY_CMDS="worker worker apply_blueprints|worker add_applications" LETS_ENCRYPT_ENV=production DOMAIN=authentik.example.com diff --git a/README.md b/README.md index 7e6ac5b..32d34ed 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ abra app secret generate -a abra app undeploy abra app deploy abra app cmd db rotate_db_pass -abra app cmd app set_admin_pass ``` ## Add SSO for Nextcloud diff --git a/abra.sh b/abra.sh index 6c20e27..7594b6d 100644 --- a/abra.sh +++ b/abra.sh @@ -73,30 +73,7 @@ with open('/tmp/$1', newline='') as file: } set_admin_pass() { -password=$(cat /run/secrets/admin_pass) -token=$(cat /run/secrets/admin_token) -/manage.py shell -c """ -akadmin = User.objects.get(username='akadmin') -akadmin.set_password('$password') -akadmin.save() -print('Changed akadmin password') - -from authentik.core.models import TokenIntents -key='$token' -if (token:= Token.objects.filter(identifier='authentik-bootstrap-token').first()): - token.key=key - token.save() - print('Changed authentik-bootstrap-token') -else: - Token.objects.create( - identifier='authentik-bootstrap-token', - user=akadmin, - intent=TokenIntents.INTENT_API, - expiring=False, - key=key, - ) - print('Created authentik-bootstrap-token') -""" 2>&1 | quieten +echo "The set_admin_pass function is depricated" } rotate_db_pass() { diff --git a/compose.yml b/compose.yml index 2314e3b..b51811b 100644 --- a/compose.yml +++ b/compose.yml @@ -8,6 +8,8 @@ x-env: &env - AUTHENTIK_REDIS__HOST=redis - AUTHENTIK_ERROR_REPORTING__ENABLED - AUTHENTIK_SECRET_KEY=file:///run/secrets/secret_key + - AUTHENTIK_BOOTSTRAP_PASSWORD=file:///run/secrets/admin_pass + - AUTHENTIK_BOOTSTRAP_TOKEN=file:///run/secrets/admin_token - AUTHENTIK_EMAIL__HOST - AUTHENTIK_EMAIL__PORT - AUTHENTIK_EMAIL__USERNAME