While it makes sense that the user has access to the JetStream API, it doesn't make sense that the server doesn't check the permissions of the user to the KV bucket itself. While this can be bypassed by limiting access to the JetStream API topics, this workaround is quite cumbersome, especially if there are many buckets and many keys, and because there are several JetStream API needed to access a bucket and get or set a key.
Observed behavior
I have a user with the following permissions: who should be able to fetch one key from a bucket, but not write to that bucket or that key:
This then works, while I feel it should not:
Expected behavior
It should give access denied.
While it makes sense that the user has access to the JetStream API, it doesn't make sense that the server doesn't check the permissions of the user to the KV bucket itself. While this can be bypassed by limiting access to the JetStream API topics, this workaround is quite cumbersome, especially if there are many buckets and many keys, and because there are several JetStream API needed to access a bucket and get or set a key.
Server and client version
nats-server --version nats-server: v2.10.7 nats --version 0.1.1
Host environment
MacOS
Steps to reproduce
No response