Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix: 400 for invalid end role signatures" #347

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/keria/app/aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,8 +1330,8 @@ def on_post(req, rep, name, aid=None, role=None):
)
try:
agent.hby.rvy.processReply(rserder, tsgs=[tsg])
except (kering.UnverifiedReplyError, kering.ValidationError):
raise falcon.HTTPBadRequest(description="unable to verify end role reply message")
except kering.UnverifiedReplyError:
pass

oid = ".".join([pre, role, eid])
op = agent.monitor.submit(
Expand Down
11 changes: 0 additions & 11 deletions tests/app/test_aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1373,16 +1373,6 @@ def test_oobi_ends(helpers):
assert res.json == {'oobis': [], 'role': 'agent'}

rpy = helpers.endrole(iserder.pre, agent.agentHab.pre)

# first try with bad signatures
sigs = helpers.sign(b'0123456789xyzxyz', 0, 0, rpy.raw)
body = dict(rpy=rpy.ked, sigs=sigs)
res = client.simulate_post(path=f"/identifiers/pal/endroles", json=body)
assert res.status_code == 400
assert res.json == {'description': "unable to verify end role reply message",
'title': '400 Bad Request'}

# now with correct
sigs = helpers.sign(salt, 0, 0, rpy.raw)
body = dict(rpy=rpy.ked, sigs=sigs)

Expand All @@ -1399,7 +1389,6 @@ def test_oobi_ends(helpers):
res = client.simulate_post(path=f"/endroles/pal", json=body)
assert res.status_code == 404


# must be a valid aid alias
res = client.simulate_get("/identifiers/bad/oobis")
assert res.status_code == 404
Expand Down
Loading