You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we use a rough heuristic to select which proofs in an access-clientAgent's proof store to send along with a particular capability invocation. Roughly, this looks through each of the stored proofs and compares it with the can and with of a passed capability specification. Once it finds a proof that matches the given capability, it stops looking:
@Gozala pointed out today in our code review that it's possible for a proof store to be "poisoned" with a proof that matches a particular can and with pair but is not actually valid. This would result in a user not being able to perform some action even though they do actually have all the proofs they need.
In the short term, @Gozala suggested we send along all the proofs we have that match a particular capability, rather than just sending the first one we find:
In the medium to long term, @Gozala proposed using the ucanto validator to do this filtering directly, which will more accurately identify proofs that can authorize a particular capability execution.
The text was updated successfully, but these errors were encountered:
Right now we use a rough heuristic to select which proofs in an
access-client
Agent
's proof store to send along with a particular capability invocation. Roughly, this looks through each of the stored proofs and compares it with thecan
andwith
of a passed capability specification. Once it finds a proof that matches the given capability, it stops looking:https://github.com/web3-storage/w3protocol/blob/main/packages/access-client/src/agent.js#L169
@Gozala pointed out today in our code review that it's possible for a proof store to be "poisoned" with a proof that matches a particular
can
andwith
pair but is not actually valid. This would result in a user not being able to perform some action even though they do actually have all the proofs they need.In the short term, @Gozala suggested we send along all the proofs we have that match a particular capability, rather than just sending the first one we find:
#433 (comment)
In the medium to long term, @Gozala proposed using the
ucanto
validator to do this filtering directly, which will more accurately identify proofs that can authorize a particular capability execution.The text was updated successfully, but these errors were encountered: