You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: horizon/config.py
+72-26Lines changed: 72 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,19 @@
4
4
5
5
6
6
classSidecarConfig(Confi):
7
-
CONTROL_PLANE=confi.str("CONTROL_PLANE", "http://localhost:8000", description="URL to the control plane that manages this PDP, typically Permit.io cloud (api.permit.io)")
7
+
CONTROL_PLANE=confi.str(
8
+
"CONTROL_PLANE",
9
+
"http://localhost:8000",
10
+
description="URL to the control plane that manages this PDP, typically Permit.io cloud (api.permit.io)",
OPA_CONFIG_FILE_PATH=confi.str("OPA_CONFIG_FILE_PATH", "~/opa/config.yaml", description="the path on the container for OPA config file")
36
-
OPA_AUTH_POLICY_FILE_PATH=confi.str("OPA_AUTH_POLICY_FILE_PATH", "~/opa/basic-authz.rego", description="the path on the container for OPA authorization policy (rego file)")
37
-
OPA_BEARER_TOKEN_REQUIRED=confi.bool("OPA_BEARER_TOKEN_REQUIRED", True, description="if true, all API calls to OPA must provide a bearer token (the value of CLIENT_TOKEN)")
38
-
OPA_DECISION_LOG_ENABLED=confi.bool("OPA_DECISION_LOG_ENABLED", True, description="if true, OPA decision logs will be uploaded to the Permit.io cloud console")
39
-
OPA_DECISION_LOG_CONSOLE=confi.bool("OPA_DECISION_LOG_CONSOLE", False, description="if true, OPA decision logs will also be printed to console (only relevant if `OPA_DECISION_LOG_ENABLED` is true)")
40
-
OPA_DECISION_LOG_INGRESS_ROUTE=confi.str("OPA_DECISION_LOG_INGRESS_ROUTE", "/v1/decision_logs/ingress", description="the route on the backend the decision logs will be uploaded to")
41
-
OPA_DECISION_LOG_MIN_DELAY=confi.int("OPA_DECISION_LOG_MIN_DELAY", 1, description="min amount of time (in seconds) to wait between decision log uploads")
42
-
OPA_DECISION_LOG_MAX_DELAY=confi.int("OPA_DECISION_LOG_MAX_DELAY", 10, description="max amount of time (in seconds) to wait between decision log uploads")
45
+
OPA_CONFIG_FILE_PATH=confi.str(
46
+
"OPA_CONFIG_FILE_PATH",
47
+
"~/opa/config.yaml",
48
+
description="the path on the container for OPA config file",
49
+
)
50
+
OPA_AUTH_POLICY_FILE_PATH=confi.str(
51
+
"OPA_AUTH_POLICY_FILE_PATH",
52
+
"~/opa/basic-authz.rego",
53
+
description="the path on the container for OPA authorization policy (rego file)",
54
+
)
55
+
OPA_BEARER_TOKEN_REQUIRED=confi.bool(
56
+
"OPA_BEARER_TOKEN_REQUIRED",
57
+
True,
58
+
description="if true, all API calls to OPA must provide a bearer token (the value of CLIENT_TOKEN)",
59
+
)
60
+
OPA_DECISION_LOG_ENABLED=confi.bool(
61
+
"OPA_DECISION_LOG_ENABLED",
62
+
True,
63
+
description="if true, OPA decision logs will be uploaded to the Permit.io cloud console",
64
+
)
65
+
OPA_DECISION_LOG_CONSOLE=confi.bool(
66
+
"OPA_DECISION_LOG_CONSOLE",
67
+
False,
68
+
description="if true, OPA decision logs will also be printed to console (only relevant if `OPA_DECISION_LOG_ENABLED` is true)",
69
+
)
70
+
OPA_DECISION_LOG_INGRESS_ROUTE=confi.str(
71
+
"OPA_DECISION_LOG_INGRESS_ROUTE",
72
+
"/v1/decision_logs/ingress",
73
+
description="the route on the backend the decision logs will be uploaded to",
74
+
)
75
+
OPA_DECISION_LOG_MIN_DELAY=confi.int(
76
+
"OPA_DECISION_LOG_MIN_DELAY",
77
+
1,
78
+
description="min amount of time (in seconds) to wait between decision log uploads",
79
+
)
80
+
OPA_DECISION_LOG_MAX_DELAY=confi.int(
81
+
"OPA_DECISION_LOG_MAX_DELAY",
82
+
10,
83
+
description="max amount of time (in seconds) to wait between decision log uploads",
84
+
)
43
85
44
86
# temp log format (until cloud config is received)
0 commit comments