keysmith: authorizationHeader takes now and refuses expired chains (after #1041)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Read the authorizationHeader implementation, its tests, and the README API row, then compare its behavior with signRequest after #1041 lands. Add optional now handling and pass it through; keep the completed expiry check, test, and README updates in mind when checking the branch. Done means the header uses the fixed time and refuses expired chains consistently with signRequest.
Written by the indexing model from the issue text.
Description
Follow-up to #1083, once #1041 has merged.
#1083's authorizationHeader is built on master's signRequest, which takes no now and doesn't check the chain's expiry. #1041 adds both to signRequest: an optional now, a refusal for an expired chain ("get a new grant to …"), and a refusal for an expires outside the gate's window.
Once both are merged:
- Add
now?toauthorizationHeader's input, computeexpiresfrom it, and pass it through tosignRequest. - Drop the helper's own
expiresInbound check, sincesignRequestthen refuses the same window. Keep its error message, or matchsignRequest's. - Tests: the header is refused for an expired chain, and is built at a fixed
now. This replaces theDate.now()-based assertions. - README API row:
authorizationHeader(signer, chain, { pieceCid, expiresIn?, now? }), which "refuses assignRequestdoes".
A reference version stacked on #1041 is on JAG-UK:feat/keysmith-authorization-header (76358ec).
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 35
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 38
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FilOzone/synapse-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
FilOzone/synapse-sdk#1039 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
FilOzone/synapse-sdk#749 · 1 comment ·
Maintainers usually reply within 1 day
-
Keysmith milestone 2Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
FilOzone/synapse-sdk#1082 ·
Maintainers usually reply within 1 day
-
Share viewer fails on gateways that ignore range requestsPossibly taken @BravoNatalie claimed this 2 days ago. Open
FilOzone/synapse-sdk#1081 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
FilOzone/synapse-sdk#1075 ·
Maintainers usually reply within 1 day
All issues in FilOzone/synapse-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
readest/readest#7413 · 1 comment ·
Maintainers usually reply within 1 day
-
content triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eliasstravik/herdr-projects#788 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Ability to edit tagsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day