diff --git a/scripts/keri/cf/verifier-config-public.json b/scripts/keri/cf/verifier-config-public.json index 9d95f05..8cdb5ff 100755 --- a/scripts/keri/cf/verifier-config-public.json +++ b/scripts/keri/cf/verifier-config-public.json @@ -26,12 +26,5 @@ "https://gleif-it.github.io/oobi/EH6ekLjSr8V32WyFbGe1zXjTzFs9PkTYmupJ9H65O14g", "https://gleif-it.github.io/oobi/EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao" ], - "LEIs": [ - "984500E5DEFDBQ1O9038", - "984500AAFEB59DDC0E43", - "254900OPPU84GM83MG36", - "9845004CC7884BN85018", - "98450030F6X9EC7C8336", - "875500ELOZEL05BVXV37" - ] + "LEIs": [] } \ No newline at end of file diff --git a/src/verifier/core/authorizing.py b/src/verifier/core/authorizing.py index df633bf..9e64490 100644 --- a/src/verifier/core/authorizing.py +++ b/src/verifier/core/authorizing.py @@ -45,7 +45,7 @@ def setup(hby, vdb, reger, cf): raise kering.ConfigurationError("invalid configuration, no LEIs available to accept") leis = data.get("LEIs") - if not isinstance(leis, list) or len(leis) == 0: + if not None and not isinstance(leis, list): raise kering.ConfigurationError("invalid configuration, invalid LEIs in configuration") authorizer = Authorizer(hby, vdb, reger, leis) @@ -133,7 +133,8 @@ def processEcr(self, creder): return LEI = creder.attrib["LEI"] - if LEI not in self.leis: + # only process LEI filter if LEI list has been configured + if len(self.leis) > 0 and LEI not in self.leis: print(f"LEI: {LEI} not allowed") return diff --git a/src/verifier/core/verifying.py b/src/verifier/core/verifying.py index 33f4bb5..f82df5b 100644 --- a/src/verifier/core/verifying.py +++ b/src/verifier/core/verifying.py @@ -126,7 +126,7 @@ def on_put(self, req, rep, said): if not found: rep.status = falcon.HTTP_BAD_REQUEST - rep.data = json.dumps(dict(msg=f"credential {said} from body of request was not found")).encode("utf-8") + rep.data = json.dumps(dict(msg=f"credential {said} from body of request did not verify")).encode("utf-8") return print(f"Credential {said} presented.") diff --git a/tests/integration/test_service.py b/tests/integration/test_service.py index 3679cd8..0806fa7 100644 --- a/tests/integration/test_service.py +++ b/tests/integration/test_service.py @@ -150,7 +150,7 @@ def get(): # # class testCf: # # def get(): # # return dict(LEIs=[f"{LEI1}",f"{LEI2}"]) -# rootsCf = configing.Configer(name="verifier-config-rootsid.json", +# rootsCf = configing.Configer(name="verifier-config-public.json", # headDirPath="/Users/meenyleeny/VSCode/vlei-verifier/scripts", # base="", # temp=False, reopen=True, clear=False)