Skip to content

Issues with invocation fixtures #201

@Gozala

Description

@Gozala

I ran into couple of issues when exercising integration with invocation spec in rs-ucan that could use some clarification or revision on fixtures

  1. Order of proofs in the invocation assumes invoker <- subject where's at some implementations seem to assume subject → invoker. In my current workstream I'm basically resorting to accepting either order, but it would be nice to have spec and test vectors align.

  2. Some of the invocation fixtures error with UnauthorizedSubject in rs-ucan instead of expected Expired / TooEarly errors. Specifically, "expired proof", "inactive proof" and "expired invocation". That is because proof authorizes sub did:key:z6MkmT9j... but then invocation claims sub did:key:z6MkmJce... which is misaligned.

    I think if subs were aligned rs-ucan would also fail on time bounds, it's just we asses subject alignment earlier. Either way I think fixing fixtures so subs align would be a good idea.

  3. I think invocation fixtures should also include time field denoting time of validation, otherwise things that are too early eventually may become not anymore early. Less likely to see same for already expired ones. Either way I think it's a good idea to to have time captured so test can be deterministic and don't have time variable in them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions