-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Connection type in scoped signing keys is not limited to MQTT #5786
Comments
@AmbersG Thank you for the report. Could you please describe in details how those 2 users were created, also, do you have auth callout defined in the server? (If you don't know what that is, the answer is likely no ;-)). |
Hey @kozlovic , they were created with NSC like here - |
@aricart It seems that the |
The JWT that is received by the server shouldn't have any limits set - as these are defined by the role. |
But how come when I add "allow_sub" properties (not directly in the user, but in the signing key) then they are reflected and visible in the user's JWT claim but not the connection types? |
The struct not looking like: "nats": {
"allowed_connection_types": [
"MQTT"
],
"data": -1,
"payload": -1,
"pub": {},
"sub": {},
"subs": -1,
"type": "user",
"version": 2
}
|
Ok, we had a meeting with @aricart and I think I understand a bit better what the problem might be. |
The check of the allowed connection types must be maded after the user's permissions limits are possibly "swapped" with the scoped signer's. Resolves #5786 Signed-off-by: Ivan Kozlovic <[email protected]>
The check of the allowed connection types must be maded after the user's permissions limits are possibly "swapped" with the scoped signer's. Resolves #5786 Signed-off-by: Ivan Kozlovic <[email protected]>
The check of the allowed connection types must be maded after the user's permissions limits are possibly "swapped" with the scoped signer's. Resolves #5786 Signed-off-by: Ivan Kozlovic <[email protected]>
The check of the allowed connection types must be maded after the user's permissions limits are possibly "swapped" with the scoped signer's. Resolves #5786 Signed-off-by: Ivan Kozlovic <[email protected]>
Observed behavior
We have an account called "test". There we have a user called mqtt and it works as expected.
Then we created SK and another user signed by this SK, here it is:
Expected behavior
Our expectation is that we can only use MQTT connection type there.
But reality both nats and mqtt connections work:
Server and client version
2.10.18
Host environment
No response
Steps to reproduce
Provided above
The text was updated successfully, but these errors were encountered: