Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Control causes timeout on intercepted requests #1779

Closed
oteffahi opened this issue Feb 17, 2025 · 2 comments · Fixed by #1795
Closed

Access Control causes timeout on intercepted requests #1779

oteffahi opened this issue Feb 17, 2025 · 2 comments · Fixed by #1795
Assignees
Labels
bug Something isn't working

Comments

@oteffahi
Copy link
Contributor

oteffahi commented Feb 17, 2025

Describe the bug

Using ACL to block request messages causes the instance performing the request to timeout on the handling of the expected responses. Ideally a blocked request should instantly resolve to an empty response, simulating the absence of destinations. This applies to query and liveliness_query messages.

To reproduce

Deny in egress a query or a liveliness_query message. The instance will wait until a timeout then log an error.

System info

Zenoh 1.2.1
All platforms

@oteffahi oteffahi added the bug Something isn't working label Feb 17, 2025
@oteffahi oteffahi changed the title Access Control causes timeout on intercepted requests/responses Access Control causes timeout on intercepted requests Feb 17, 2025
@DenisBiryukov91
Copy link
Contributor

@oteffahi Maybe it is worth returning a error response, explaining that user does not have required permission ?

@oteffahi
Copy link
Contributor Author

oteffahi commented Feb 21, 2025

@oteffahi Maybe it is worth returning a error response, explaining that user does not have required permission ?

Suppose you perform a get on ** and have egress filters for certain connected peers that should not receive the get, in this case you receive responses from the authorized peers, and timeout on the peers that never received the get. Returning an Error wouldn't make sense, since blocking the get at egress was intended behavior.
In another case, if the get is blocked at ingress by the destination, the timeout issue will also occur on the sender of the get, and in this case responding with an error that they do not have the permission makes more sense than the previous scenario. However access control should ideally not leak the information that the remote instance is blocking the get, and should instead create the illusion that there was no matching destination for the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants