summaryrefslogtreecommitdiff
path: root/auth-server-poc
diff options
context:
space:
mode:
Diffstat (limited to 'auth-server-poc')
-rw-r--r--auth-server-poc/src/app.py3
-rw-r--r--auth-server-poc/userdb.yaml (renamed from auth-server-poc/src/userdb.yaml)6
2 files changed, 8 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),
diff --git a/auth-server-poc/src/userdb.yaml b/auth-server-poc/userdb.yaml
index c55773b..937328c 100644
--- a/auth-server-poc/src/userdb.yaml
+++ b/auth-server-poc/userdb.yaml
@@ -1,3 +1,9 @@
+usr:
+ authz:
+ sunet.se: rw
+ su.se: rw
+ kth.se: rw
+
user1:
authz:
sunet.se: r