Added API key requirement to main paths and support for different users
This commit is contained in:
1 parent
5d665d3310
commit
06d1e2bd11
5 files changed
+91
-44
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from enum import StrEnum
|
||||
|
||||
from service_auth import KeySource, ServiceAuth
|
||||
|
||||
|
||||
class Caller(StrEnum):
|
||||
GATEWAY = "gateway"
|
||||
SCHEDULER = "scheduler"
|
||||
|
||||
auth = ServiceAuth({
|
||||
Caller.GATEWAY: KeySource("GATEWAY_KEY", "/etc/secrets/gateway_key"),
|
||||
Caller.SCHEDULER: KeySource("SCHEDULER_KEY", "/etc/secrets/scheduler_key"),
|
||||
})
|
||||
Reference in new issue
Block a user