Commit Graph

15 Commits

Author SHA1 Message Date
Jason Rhinelander 95f632bbe9
Bump clang-format to 14
Our lint ci image no longer has an available clang-format-11.
2023-01-13 21:27:39 -04:00
Jason Rhinelander f475f35034
Add expiry retrieval, expiry extend-only mode
- Adds `get_expiries` endpoint to retrieve expiries
- Adds `extend=True` parameter to the expire_msgs endpoint.  This is
  just like `shorten=True` but in the opposite direction (i.e. it allows
  you to only extend).
- Adds `unchanged` key to the result of a expire_msgs: this is a dict of
  all the hashes -> expiries of all hashes that were *not* updated when
  using one of the new shorten/extend options.
2023-01-13 21:18:45 -04:00
Jason Rhinelander 5492481860
Add "shorten" option to expire_msgs
This allows updating expiries on messages but only if it would shorten
those expiries.
2023-01-11 20:25:20 -04:00
Sean Darcy ad9fd5d3c2 Revoking Subkeys
This adds a new endpoint to the storage server to revoke a subkey. The
storage server will keep track of previously revoked subkeys and will
now check that a message authenticated by a subkey does not use one of
these revoked subkeys.
2022-08-12 11:22:51 +10:00
Jason Rhinelander 1a1b143f97
Allow subkey authentication for expiry extension
Allows subkey authentication for the `expire` endpoint; if using a
subkey, expiries can be extended but not shortened (so that you can't
misuse expiry to delete messages prematurely).
2022-07-22 15:47:21 -03:00
Jason Rhinelander cc57cbf77c
Formatting: use short typedefs for load_fields
The `load_fields` calls using a ton of vertical space because of the
long list of type names; this adds some short typedefs to significantly
shorten them and make the formatted code much smaller.
2022-07-22 15:47:21 -03:00
Jason Rhinelander 3f6a1cf396
Add failable delete_msgs
Adding `"required": true` to the delete_msgs request tells SS to return
a 404 if no swarm members found anything to delete, allowing chaining
into a sequence to only proceed if a message got deleted.
2022-07-22 15:47:20 -03:00
Jason Rhinelander b2eb1bce93
formatting 2022-05-26 22:07:14 -03:00
Jason Rhinelander d0f81c7b35
Add size limits to retrieve messages 2022-05-26 20:15:41 -03:00
Jason Rhinelander 389ac24d27
Add `ifelse` branching metarequest
This lets you make conditional requests based on the HF, SS version, or
block height.  For future use (since this won't be usable before HF19).
2022-05-10 16:08:21 -03:00
Jason Rhinelander 91e71da253
Disallow empty batch/sequence; fix docs
Change "up to 6" -> "1 to 5" in the docs; the latter was a typo, the
former for this commit.
2022-05-05 20:52:20 -03:00
Jason Rhinelander 0264de1daa
Use "" instead of "0" for all default namespace signatures
This makes all endpoints consistent w.r.t. how the namespace is handled:
invoking with "namespace": 0 and omitting namespace are now equivalent
(and use the same signature value, with "" for the namespace value) for
all endpoints.
2022-05-05 18:21:29 -03:00
Jason Rhinelander 807c437183
Add batch/sequence requests 2022-05-05 18:21:28 -03:00
Jason Rhinelander 2776ebe50a
Add draft subkey authentication for store/retrieve
This should be sufficient for the current draft design of v2 closed
groups; if so, including the support now saves us a soft fork later.
2022-05-05 15:52:52 -03:00
Jason Rhinelander 8364ef029f
Refactor code
- Moves all source code under oxenss/
- Removes .../include, .../src setup
- Use include subdirectories and subnamespaces
- Various small code cleanups in common/utils code, eliminating or
  splitting up unrelated functionality.
2022-04-29 14:17:00 -03:00
Renamed from httpserver/client_rpc_endpoints.cpp (Browse further)