This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
forked from NASA-IMPACT/veda-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
72 lines (61 loc) · 2.02 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
from getpass import getuser
from typing import Optional
import pydantic
class AuthConfig(pydantic.BaseSettings):
app_name: str = pydantic.Field(
"auth",
description="Name of the associated App.",
)
stage: str = pydantic.Field(
description=" ".join(
[
"Stage of deployment (e.g. 'dev', 'prod').",
"Used as suffix for stack name.",
"Defaults to current username.",
]
),
default_factory=getuser,
)
owner: str = pydantic.Field(
description=" ".join(
[
"Name of primary contact for Cloudformation Stack.",
"Used to tag generated resources",
"Defaults to current username.",
]
),
default_factory=getuser,
)
data_managers_role_arn: str = pydantic.Field(
None,
description="ARN of role to be assumed by authenticated users in data managers group.",
)
project_prefix: Optional[str] = pydantic.Field(
None,
description="Project prefix (ghgc/veda/...)",
)
oidc_provider_url: Optional[str] = pydantic.Field(
None,
description="URL of OIDC provider to use for CI workers.",
)
oidc_thumbprint: Optional[str] = pydantic.Field(
None,
description="Thumbprint of OIDC provider to use for CI workers.",
)
permissions_boundary_policy_name: Optional[str] = pydantic.Field(
None,
description="Name of IAM policy to define stack permissions boundary",
)
# Since MCP doesn't allow creating identity pools, setting this as optional
cognito_groups: Optional[bool] = pydantic.Field(
True,
description="Where to create cognito groups with bucket access permissions",
)
cdk_qualifier: Optional[str] = pydantic.Field(
"hnb659fds",
description="CDK qualifier for deployment.",
)
class Config:
"""model config."""
env_file = ".env"
auth_app_settings = AuthConfig()