Do not sign every request for streaming RPC with safe endpoints #942

Open
opened 2024-01-30 11:50:49 +00:00 by fyrchik · 3 comments
Owner

If we connect to some endpoint with TLS enabled, there is no need to authenticate every single message.
This works for both client- and server-side streams.

For example, in tree.GetChildren or object.Search the amount of responses scales linearly with the number of objects in container. Signing and verification introduce latency on each operations in stream, which could contribute a noticeable value to the total operation cost.

However, if TLS is enabled, then we could authenticate once (should be easy, but not trivial, think about replay attacks). Even disabling signature checking in trusted environment (localhost endpoint) can provide benefits, as the setup with s3/node being on one physical server is common.

Ideally, we could somehow extract FrostFS identity from the client certificate, but this is much more intrusive.

If we connect to some endpoint with TLS enabled, there is no need to authenticate every single message. This works for both client- and server-side streams. For example, in `tree.GetChildren` or `object.Search` the amount of responses scales linearly with the number of objects in container. Signing and verification introduce latency on each operations in stream, which could contribute a noticeable value to the total operation cost. However, if TLS is enabled, then we could authenticate once (should be easy, but not trivial, think about replay attacks). Even disabling signature checking in trusted environment (localhost endpoint) can provide benefits, as the setup with s3/node being on one physical server is common. Ideally, we could somehow extract FrostFS identity from the client certificate, but this is much more intrusive.
fyrchik added the
discussion
frostfs-node
perfomance
labels 2024-01-30 11:50:49 +00:00
Author
Owner

tree.GetOpLog is another useful case, which can speed up tree synchronization.

`tree.GetOpLog` is another useful case, which can speed up tree synchronization.
Author
Owner

Another option is to make client responsible for disabling signatures
Though this won't work for client-side streams.

Another option is to make client responsible for disabling signatures Though this won't work for client-side streams.
Owner

We could also significantly reduce CPU load by avoiding the need to sign each request-response in a series of HEAD requests during replication from the same node in the same TLS connection.

We could also significantly reduce CPU load by avoiding the need to sign each request-response in a series of HEAD requests during replication from the same node in the same TLS connection.
fyrchik added this to the vNext milestone 2024-02-12 06:24:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#942
No description provided.