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

Ensure timely delegation #198

Open
Gozala opened this issue Jan 19, 2023 · 2 comments
Open

Ensure timely delegation #198

Gozala opened this issue Jan 19, 2023 · 2 comments

Comments

@Gozala
Copy link
Collaborator

Gozala commented Jan 19, 2023

Per UCAN specification

All proofs MUST contain time bounds equal to or broader than the UCAN being delegated. If the proof expires before the outer UCAN — or starts after it — the reader MUST treat the UCAN as invalid. Delegation inside of the time bound is called "timely delegation."

ucanto does not actually treat ucans with wider time bounds than it's proofs invalid, which is incorrect.

Task here is to update implementation to do what spec says and test case(s) to ensure it does so.

@gobengo
Copy link
Contributor

gobengo commented Jan 19, 2023

@Gozala at what point do you have in mind enforcing this? do you want to throw if trying to create a delegation with too-narrow of time bounds? Or should the creation of that delegation be possible, but you want to make sure the validator will catch it as invalid?

@Gozala
Copy link
Collaborator Author

Gozala commented Jan 19, 2023

@Gozala at what point do you have in mind enforcing this? do you want to throw if trying to create a delegation with too-narrow of time bounds? Or should the creation of that delegation be possible, but you want to make sure the validator will catch it as invalid?

I was implying that validator should fail to validate such chains.

P.S.: Right now we don't enforce anything at delegation time, mostly because proofs could be CIDs, however adding some checks where possible had on my todo list for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants