Expose Server Name Indication (SNI) within ClientTLS autorization request claims #4706
Replies: 5 comments 29 replies
-
That information is already present. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply ! |
Beta Was this translation helpful? Give feedback.
-
I just looked again, but that's not the same thing isn't it ? I may have host set to {
"aud": "nats-authorization-request",
"exp": 1698248970,
"jti": "KUEYEBMA5WXYHIMFWXKYV4GKB234KZPT7XTEQKUDKFB3WJM6IHPQ",
"iat": 1698248968,
"iss": "ND2VRW5IA7UIZTAJ4U2C2ZW3ROJSRLENP2CXLEIAWGEATT5XS7SSXTSY",
"sub": "ACMHTF46SWZIFZMOUKPC7YL2L3EGMEM7NYGBYSNXQBOAHI6XC2VUWDRI",
"nats": {
"server_id": {
"name": "srv-01",
"host": "0.0.0.0",
"id": "ND2VRW5IA7UIZTAJ4U2C2ZW3ROJSRLENP2CXLEIAWGEATT5XS7SSXTSY",
"version": "2.11.0-dev"
},
"user_nkey": "UDXT3HLG24IHVVT2U67SHNY24IEK5G2ZA32UH4G3PBHTGRMAWXYOI2NE",
"client_info": {
"host": "127.0.0.1",
"id": 10,
"user": "TEST",
"name": "NATS CLI Version 0.0.35",
"kind": "Client",
"type": "websocket"
},
"connect_opts": {
"auth_token": "TEST",
"name": "NATS CLI Version 0.0.35",
"lang": "go",
"version": "1.19.0",
"protocol": 1
},
"client_tls": {
"version": "1.3",
"cipher": "TLS_AES_128_GCM_SHA256",
"server_name": "other.local.quara-dev.com"
},
"type": "authorization_request",
"version": 2
}
} What I want is really the server name used during TLS handshake, not a server name configured on server side. In my case, server accepts connections on several domain names, which are unrelated to server name. Note: the |
Beta Was this translation helpful? Give feedback.
-
Agree @charbonnierg it's not the same. I am curious what the use case is for verifying this in callout? Not saying its an invalid idea or anything I am just curious :) |
Beta Was this translation helpful? Give feedback.
-
If it can help understanding the feature request, I have an experimental auth callout plugin system configurable using policies. A policy has:
And I'm very interested in having a matcher based on tls server name, just like in the example below:
|
Beta Was this translation helpful? Give feedback.
-
I'm using an auth callout service to authenticate/authorize users on a TLS enabled NATS server.
I would like to know the server name that was used during client TLS handshake within my auth callout service.
Like in this example below, I would like to deny access if the proper server name is not used, even if token is valid:
In order to do that, I had to modify both the jwt and nats-server repositories and added support for server name in request claims.
I've got two questions:
Beta Was this translation helpful? Give feedback.
All reactions