Skip to content

Refuse a consumed or earlier-session approval presented again - #294

Open
astrogilda wants to merge 2 commits into
GenAI-Security-Project:integrationfrom
astrogilda-forks:spec/approval-lifetime
Open

astrogilda wants to merge 2 commits into
GenAI-Security-Project:integrationfrom
astrogilda-forks:spec/approval-lifetime

Conversation

@astrogilda

Copy link
Copy Markdown

What changed

@bar-capsule, @afogel, @rocklambros, this PR adds section 9.3 to the specification with the sentence proposed on #53:

A Guardian MUST refuse a consumed one-time approval, or one bound to an earlier session, presented again in a fresh signed request.

Section 9.3 defines one-time, consumed and session-bound grants and registers REPLAY_CONSUMED in 17.1 as -32009, leaving -32008 to Discussion #257. ACS v0.1 has no request field that names a grant, so the testable half is reuse: an approved action sent again gets no approval. @avp9-nexus, -32009 is the 17.1 code for the two REPLAY_CONSUMED vectors on your negative-vectors-v0.2 branch.

Which issue does this implement

Part of #33; refs #53.

I tested this

At b564d10, the head of this branch, pytest gives 919 passed and the strict mkdocs build passes.

Section 10.3 defines a replay on the request: a duplicate request_id or
nonce within the session. A one-time approval already consumed, or a
grant from an earlier session, presented again in a fresh signed request
is neither, so no section refused it and 17.1 had no code for it.

Section 9.3 defines one-time, consumed and session-bound grants and
requires a Guardian to refuse such an approval with REPLAY_CONSUMED,
registered as -32009 because -32008 is proposed for a retryable overload
code. Section 10.3 and the ACS-Core list point at the new section.

Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
The section no longer touches the ACS-Core list, which is the Spec
workstream's call for a later release. It says that v0.1 has no request
field naming a grant, so the reuse rule is the half a wire test can
observe, and that a second request presenting a one-time approval is
refused even before the first decision returns.

Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant