diff options
author | Ernst Widerberg <ernst@sunet.se> | 2022-01-14 13:04:14 +0100 |
---|---|---|
committer | Ernst Widerberg <ernst@sunet.se> | 2022-01-14 13:04:14 +0100 |
commit | bb1d91b8e87c7019574b01bbf44dbff83d8bae52 (patch) | |
tree | ad24c70284eab6f1c0db94e89ba97cb309e9f437 /auth-server-poc/src/app.py | |
parent | 5048ec216ffc8bc797186886cb52141f96207931 (diff) |
Move userdb.yaml to mounted volume
Diffstat (limited to 'auth-server-poc/src/app.py')
-rw-r--r-- | auth-server-poc/src/app.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/auth-server-poc/src/app.py b/auth-server-poc/src/app.py index c7ba0d1..37a7030 100644 --- a/auth-server-poc/src/app.py +++ b/auth-server-poc/src/app.py @@ -16,6 +16,7 @@ jwt = JWTManager(app) PEM_PRIVATE = "/opt/auth-server-poc/cert/private.pem" PEM_PUBLIC = "/opt/auth-server-poc/cert/public.pem" +USERDB_YAML = "/opt/auth-server-poc/userdb/userdb.yaml" app.config["JWT_PRIVATE_KEY"] = open(PEM_PRIVATE).read() app.config["JWT_PUBLIC_KEY"] = open(PEM_PUBLIC).read() @@ -28,7 +29,7 @@ class AuthApi(Resource): def post(self): identity = request.environ.get("REMOTE_USER") - db = authn.UserDB("userdb.yaml") + db = authn.UserDB(USERDB_YAML) additional_claims = { "type": "access", "read": db.read_perms(identity), |