diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index d0729a1f4..6f4aa46e8 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -3,6 +3,7 @@ postgresql: host: localhost name: authentik user: authentik + port: 5432 password: 'env://POSTGRES_PASSWORD' web: diff --git a/authentik/outposts/tests/test_api.py b/authentik/outposts/tests/test_api.py index ce4467447..61a09ce0f 100644 --- a/authentik/outposts/tests/test_api.py +++ b/authentik/outposts/tests/test_api.py @@ -29,17 +29,19 @@ class TestOutpostServiceConnectionsAPI(APITestCase): def test_outpost_config(self): """Test Outpost's config field""" - provider = ProxyProvider.objects.create(name="test", authorization_flow=Flow.objects.first()) - invalid = OutpostSerializer(data={ - "name": "foo", - "providers": [provider.pk], - "config": {} - }) + provider = ProxyProvider.objects.create( + name="test", authorization_flow=Flow.objects.first() + ) + invalid = OutpostSerializer( + data={"name": "foo", "providers": [provider.pk], "config": {}} + ) self.assertFalse(invalid.is_valid()) self.assertIn("config", invalid.errors) - valid = OutpostSerializer(data={ - "name": "foo", - "providers": [provider.pk], - "config": default_outpost_config("foo") - }) + valid = OutpostSerializer( + data={ + "name": "foo", + "providers": [provider.pk], + "config": default_outpost_config("foo"), + } + ) self.assertTrue(valid.is_valid()) diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 344ce3e86..914c00daf 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -248,6 +248,7 @@ DATABASES = { "NAME": CONFIG.y("postgresql.name"), "USER": CONFIG.y("postgresql.user"), "PASSWORD": CONFIG.y("postgresql.password"), + "PORT": int(CONFIG.y("postgresql.port")), } }