Skip to content

Commit 16acf3a

Browse files
committed
Tidied up keys in 'Security' BaseModel
1 parent b0b4378 commit 16acf3a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/murfey/util/config.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,31 @@ def from_file(config_file_path: Path, instrument: str = "") -> dict[str, Machine
114114

115115

116116
class Security(BaseModel):
117+
# Murfey database settings
117118
murfey_db_credentials: Path
118119
crypto_key: str
119-
auth_key: str = ""
120+
sqlalchemy_pooling: bool = True
121+
122+
# ISPyB settings
123+
ispyb_credentials: Optional[Path] = None
124+
125+
# Murfey server connection settings
120126
auth_algorithm: str = ""
127+
auth_key: str = ""
128+
auth_type: Literal["password", "cookie"] = "password"
121129
auth_url: str = ""
122-
sqlalchemy_pooling: bool = True
123-
allow_origins: list[str] = ["*"]
130+
cookie_key: str = ""
124131
session_validation: str = ""
125132
session_token_timeout: Optional[int] = None
126-
auth_type: Literal["password", "cookie"] = "password"
127-
cookie_key: str = ""
133+
allow_origins: list[str] = ["*"]
134+
135+
# RabbitMQ settings
128136
rabbitmq_credentials: Path
129137
feedback_queue: str = "murfey_feedback"
138+
139+
# Graylog settings
130140
graylog_host: str = ""
131141
graylog_port: Optional[int] = None
132-
ispyb_credentials: Optional[Path] = None
133142

134143
@validator("graylog_port")
135144
def check_port_present_if_host_is(

0 commit comments

Comments
 (0)