-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unscoped Capabilities are unusable #121
Comments
I haven't been in the guts of Agreed that otherwise, disabling this line until there's some other fix seems sensible. |
To clarify, I'm starting with |
Ooooh I see. Thanks for the clarification! |
For reference: #25 |
@blaine I think this is more an artifact of incomplete migration across rapidly changing versions of the spec than anything else. We have yet to correctly implement |
Currently, the now-deprecated |
Also, in case it needs to be said:
Yes, please do not use until #25 is closed out. |
When using unscoped capabilities (e.g.,
ucan:*
), rs-ucan converts this "with" into*
and omits the URI scheme:rs-ucan/ucan/src/capability/semantics.rs
Line 139 in 83528cc
this alone is probably a security issue (e.g.,
ucan:*
is not equal tohttps:*
for capability purposes), but has the unfortunate downside that unscoped capabilities are then not usable for the purposes of chain validation:rs-ucan/ucan/src/capability/semantics.rs
Line 160 in 83528cc
In the above, the scope (which has been down-converted to simply
*
from e.g.ucan:*
) is re-parsed and silently fails (use of anyhow here masks this error), returningNone
instead of the otherwise-valid capability.The workaround is easy, i.e. just don't use unscoped capabilities, but flagging this here for a future fix. A fix should be as simple as either not using Unscoped at all (literally removing this line,
rs-ucan/ucan/src/capability/semantics.rs
Line 139 in 83528cc
Unscoped
Resource
type (asScoped
has).I don't know what the motivation behind treating unscoped capabilities differently was, so I'll hold off on contributing a patch for now but lmk!
The text was updated successfully, but these errors were encountered: