From 5068c518b8abcb700f57feb957081d80b2f21820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 6 Feb 2025 12:54:50 +0300 Subject: [PATCH] [DOP-23743] All hardcoded passwords in this repo are used ONLY for tests --- .env.docker | 16 ++++++++-------- .env.local | 4 ++-- docker-compose.test.yml | 5 ++++- docker-compose.yml | 5 ++++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.env.docker b/.env.docker index 7dccbdd9..83c3472d 100644 --- a/.env.docker +++ b/.env.docker @@ -1,11 +1,11 @@ -# Init Postgres database -POSTGRES_DB=horizon -POSTGRES_USER=horizon -POSTGRES_PASSWORD=Aeviphai6juo3ooY7iecaivieX5OoMai - # See Backend -> Configuration documentation -HORIZON__DATABASE__URL=postgresql+asyncpg://horizon:Aeviphai6juo3ooY7iecaivieX5OoMai@db:5432/horizon -HORIZON__AUTH__ACCESS_TOKEN__SECRET_KEY=bae1thahr8Iyaisai0kohvoh1aeg5quu +HORIZON__DATABASE__URL=postgresql+asyncpg://horizon:123UsedForTestOnly@db:5432/horizon HORIZON__AUTH__PROVIDER=horizon.backend.providers.auth.dummy.DummyAuthProvider +HORIZON__AUTH__ACCESS_TOKEN__SECRET_KEY=234UsedForTestOnly +HORIZON__AUTH__LDAP__URL=ldap://ldap:389 +HORIZON__AUTH__LDAP__BASE_DN=ou=people,dc=ldapmock,dc=local +HORIZON__AUTH__LDAP__LOOKUP__CREDENTIALS__USER=uid=adminuser1,ou=people,dc=ldapmock,dc=local +HORIZON__AUTH__LDAP__LOOKUP__CREDENTIALS__PASSWORD=password +HORIZON__SERVER__DEBUG=true HORIZON__SERVER__LOGGING__PRESET=colored -HORIZON__SERVER__DEBUG=false +HORIZON_TEST_SERVER_URL=http://backend:8000 diff --git a/.env.local b/.env.local index f8ba2d82..6342103d 100644 --- a/.env.local +++ b/.env.local @@ -1,6 +1,6 @@ -export HORIZON__DATABASE__URL=postgresql+asyncpg://horizon:Aeviphai6juo3ooY7iecaivieX5OoMai@127.0.0.1:5432/horizon +export HORIZON__DATABASE__URL=postgresql+asyncpg://horizon:123UsedForTestOnly@127.0.0.1:5432/horizon export HORIZON__AUTH__PROVIDER=horizon.backend.providers.auth.dummy.DummyAuthProvider -export HORIZON__AUTH__ACCESS_TOKEN__SECRET_KEY=bae1thahr8Iyaisai0kohvoh1aeg5quu +export HORIZON__AUTH__ACCESS_TOKEN__SECRET_KEY=234UsedForTestOnly export HORIZON__AUTH__LDAP__URL=ldap://localhost:389 export HORIZON__AUTH__LDAP__BASE_DN=ou=people,dc=ldapmock,dc=local export HORIZON__AUTH__LDAP__LOOKUP__CREDENTIALS__USER=uid=adminuser1,ou=people,dc=ldapmock,dc=local diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 1b744168..7332aff5 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -2,7 +2,10 @@ services: db: image: postgres:alpine restart: unless-stopped - env_file: .env.docker + environment: + POSTGRES_DB: horizon + POSTGRES_USER: horizon + POSTGRES_PASSWORD: 123UsedForTestOnly ports: - 5432:5432 volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 5e63df7d..0ae4195b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,10 @@ services: db: image: postgres:alpine restart: unless-stopped - env_file: .env.docker + environment: + POSTGRES_DB: horizon + POSTGRES_USER: horizon + POSTGRES_PASSWORD: 123UsedForTestOnly ports: - 5432:5432 volumes: