-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/tls: access to TLS Session ID #18346
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
Comments
To @agl for decision. |
The TLS Finished hash closes over the session ID so, if the connection is successful, you don't need to check that they match. |
I may not expressed the issue well by judging your answer. The TLS session is established and I have it between the Client and one Server. Hopefully with the right server and hope there is no Man-in-the-middle but how can I be sure? I have to do a DNS-Sec + using the Certificate pinning and hope the private key of other party is not corrupted. This is an IoT use case where devices communicating with each other and those hardwares may not capable to protect their key pair in Go environment. I'm using the GlobalPlatform but unfortunately the TLS Session may be made from the OS which is untrusted so I'd like to add extra security and from a Trusted Environment ensure I'm using the very same TLS Session to exchange the data with the correct other party. In Go language it's impossible because of these 4 lines missing. I'm open to discuss the use case further and with a good reason accept if it's denied but I just want to be sure it's Closed because of good reason and not because not clearly understand the problem. There is and Active TLS Session where I'm exchanging multiple HTTP or MQTT messages and part of the authentication I'd like to HMAC the sessionId with a secret PSK and add it to the message so I can be sure the communication is not intercepted by any third-party. I may use a Secure Element Applet to do so but this is really a blocking issue for me now. |
Sorry, I don't understand the feature request.
If the client is not capable of keeping the private key secure,
then anyone that gets hold of the private key can impersonate
that client (it might not be able to do MITM if the client has certificate
pinning, but being able to impersonate a client already means
the security between that (client, server) pair is already compromised.
I don't think you can do anything better in this situation with TLS
alone.
|
It sounds like you want a value that identifies the TLS connection and that you can have the two sides authenticate at a higher level to ensure that they are both seeing the same connection, and not two different connections that have a MITM proxying messages between them. The session ID is not that value; it does not identify the connection in the way that I think you want. Rather you want the |
Thank you Adam. This is what I really want to achieve. I used the TLSUnique in Go before but unfortunately I was not aware of the limitation of Java Servlet which only exposes the SessionId and I was advised to use that. After doing my research I really need something like The Token Binding Protocol Version 1.0 in the future. I found your explanation very helpful and it makes complete sense. Now I see the TLSSessionID next to TLSUnique would server only debugging purpose nothing more. |
I'd like to implement a secure TLS session and make sure both party has the same TLS Session ID but Go does not allow access to that information. I'm using DNS Sec and other Crypto methods to protect against Man-in-the-middle attack and this would be one of the pillar of protection. I described my sample here but I didn't find any other way except to patch the Go so I attached my four line changes.
I'm using Go 1.7.4 with environment
Patch
I used the
release-branch.go1.7
branch to make it available.The text was updated successfully, but these errors were encountered: