From 5108cc5bff598fcebbcef7388485658c56d02886 Mon Sep 17 00:00:00 2001 From: andres-h Date: Tue, 31 Mar 2026 18:15:00 +0200 Subject: [PATCH] [fdsnws] Support eduperson_entitlement in JWT --- apps/fdsnws/fdsnws.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/fdsnws/fdsnws.py b/apps/fdsnws/fdsnws.py index f478ec554..4e97a243b 100644 --- a/apps/fdsnws/fdsnws.py +++ b/apps/fdsnws/fdsnws.py @@ -269,6 +269,14 @@ def authorize(self, user, net, sta, loc, cha, t1, t2): except KeyError: pass + try: + # New in JWT + for memberof in user["eduperson_entitlement"]: + matchers.append((self.__matchAttribute, f"{memberof}")) + + except KeyError: + pass + for m in matchers: for u, start, end in self.__access.get((net, "", "", ""), []): if self.__matchTime(t1, t2, start, end) and m[0](m[1], u):