mirror of
https://github.com/oxen-io/oxen-storage-server.git
synced 2023-12-13 21:00:26 +01:00
Add namespace to expire_all auth signature
This commit is contained in:
parent
0264de1daa
commit
9d3d02cf9a
|
@ -405,8 +405,10 @@ struct delete_before final : recursive {
|
|||
/// namespace (namespace 0).
|
||||
/// - expiry -- the new expiry timestamp (milliseconds since unix epoch). Should be >= now, but
|
||||
/// tolerance acceptance allows >= 60s ago.
|
||||
/// - signature -- signature of ("expire_all" || expiry), signed by `pubkey`. Must be base64
|
||||
/// encoded (json) or bytes (OMQ).
|
||||
/// - signature -- signature of ("expire_all" || namespace || expiry), signed by `pubkey`. Must be
|
||||
/// base64 encoded (json) or bytes (OMQ). namespace should be the stringified namespace for
|
||||
/// non-default namespace expiries (i.e. "42", "-99", "all"), or an empty string for the default
|
||||
/// namespace (whether or not explicitly provided).
|
||||
///
|
||||
/// Returns dict of:
|
||||
/// - "swarms" dict mapping ed25519 pubkeys (in hex) of swarm members to dict values of:
|
||||
|
|
|
@ -968,6 +968,7 @@ void RequestHandler::process_client_req(rpc::expire_all&& req, std::function<voi
|
|||
std::nullopt, // no subkey allowed
|
||||
req.signature,
|
||||
"expire_all",
|
||||
signature_value(req.msg_namespace),
|
||||
req.expiry)) {
|
||||
OXEN_LOG(debug, "expire_all: signature verification failed");
|
||||
return cb(Response{http::UNAUTHORIZED, "expire_all signature verification failed"sv});
|
||||
|
|
Loading…
Reference in a new issue