Skip to content

Commit 0655765

Browse files
committed
[DOP-26758] Fix tests
1 parent 7db01f3 commit 0655765

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.env.docker

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ DATA_RENTGEN__KAFKA__COMPRESSION=zstd
3737
DATA_RENTGEN__UI__API_BROWSER_URL=http://localhost:8000
3838

3939
# Session
40+
DATA_RENTGEN__SERVER__SESSION__ENABLED=True
4041
DATA_RENTGEN__SERVER__SESSION__SECRET_KEY=session_secret_key
4142

4243
# Keycloak Auth
@@ -54,8 +55,8 @@ DATA_RENTGEN__AUTH__PROVIDER=data_rentgen.server.providers.auth.dummy_provider.D
5455
DATA_RENTGEN__AUTH__ACCESS_TOKEN__SECRET_KEY=access_key_secret
5556

5657
# Personal Tokens
57-
export DATA_RENTGEN__AUTH__PERSONAL_TOKENS__ENABLED=True
58-
export DATA_RENTGEN__AUTH__PERSONAL_TOKENS__SECRET_KEY=pat_secret
58+
DATA_RENTGEN__AUTH__PERSONAL_TOKENS__ENABLED=True
59+
DATA_RENTGEN__AUTH__PERSONAL_TOKENS__SECRET_KEY=pat_secret
5960

6061
# Cors
6162
DATA_RENTGEN__SERVER__CORS__ENABLED=True

.env.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export DATA_RENTGEN__SERVER__DEBUG=True
1616
export DATA_RENTGEN__UI__API_BROWSER_URL=http://localhost:8000
1717

1818
# Session
19+
export DATA_RENTGEN__SERVER__SESSION__ENABLED=True
1920
export DATA_RENTGEN__SERVER__SESSION__SECRET_KEY=session_secret_key
2021

2122
# Keycloak Auth

data_rentgen/server/settings/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class SessionSettings(BaseModel):
1313
"""Session Middleware Settings.
1414
15-
Required for :ref:`keycloak-auth-provider`.
15+
Required for :ref:`auth-server-keycloak`.
1616
1717
See `SessionMiddleware <https://www.starlette.io/middleware/#sessionmiddleware>`_ documentation.
1818
@@ -75,7 +75,7 @@ class SessionSettings(BaseModel):
7575

7676
model_config = ConfigDict(extra="allow")
7777

78-
@field_validator("secret_key")
78+
@field_validator("secret_key", mode="after")
7979
@classmethod
8080
def _validate_secret_key(cls, value: SecretStr | None, info: ValidationInfo) -> SecretStr | None:
8181
if not value and info.data.get("enabled"):

0 commit comments

Comments
 (0)