1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-15 17:50:57 +00:00
Commit graph

14 commits

Author SHA1 Message Date
Cole Helbling
858e5bec13 Merge remote-tracking branch 'upstream/main' into rs256-support 2024-07-26 07:25:11 -07:00
Zhaofeng Li
14cb5f9e46 Trivial semver-incompatible upgrades 2024-06-01 13:47:27 -06:00
Cole Helbling
18dedcc30b token: switch to using IndexMap for consistent ordering of entries
Because of the random ordering of HashMap, if you have
overlapping token permissions, it is possible to randomly pick
one that leads to some operation working intermittently (see
https://github.com/zhaofengli/attic/issues/133 for an example of this).

By using an IndexMap instead, we make "iteration order of the key-value
pairs [...] independent of the hash values of the keys" (from the
indexmap crate docs [1]), which leads to more predictable behavior.

[1]: https://docs.rs/indexmap/latest/indexmap/
2024-05-25 11:26:40 -07:00
Cole Helbling
0a9d4938ef Move back to jwt_simple
This effectively reverts commit 3e0b65a4c3.

Because jwt_simple doesn't have a unified type / trait that allows
signature and verification, I had to add a SignatureType enum to
approximate that.
2023-11-12 12:19:22 -08:00
Cole Helbling
9e23916e02 token: fixup JWT creation
Since we now validate the `sub` and `nbf` claims, they need to be set
when atticadm generates them.
2023-11-12 11:19:34 -08:00
Graham Christensen
d49cd3383b Make the nix flake check tests pass 2023-11-11 12:58:59 -08:00
Graham Christensen
9511afde4b server: HS256 -> RS256 secrets 2023-11-11 12:58:57 -08:00
Graham Christensen
3e0b65a4c3 Migrate to jsonwebtoken 2023-11-11 12:58:55 -08:00
Zhaofeng Li
2d0aeefd2f Trivial semver-incompatible upgrades 2023-05-28 15:23:45 -06:00
Zhaofeng Li
6489d775ae Update deps 2023-05-28 15:23:45 -06:00
Zhaofeng Li
97285de54f Upgrade base64 2023-03-05 11:05:11 -07:00
Zhaofeng Li
18ca2cf29a Update deps 2023-03-05 11:05:11 -07:00
Zhaofeng Li
6c4d04da74 Migrate to jwt-simple 2023-01-08 00:57:22 -07:00
Zhaofeng Li
77070b9895 Refactor token into a separate crate 2023-01-08 00:57:22 -07:00