Skip to content

Authorization and Authentication #3170

Answered by ousloob
MOHANKUMAR-IT asked this question in Q&A
Discussion options

You must be logged in to vote

@MOHANKUMAR-IT
Yes, multistream negotiation happens before TLS negotiation. When a peer connects, it first goes through the multistream protocol selection process to determine the security module to use (mTLS in your case). Only after that does the TLS handshake occur.

Your test makes sense: since you initiated a plain TCP connection, the node responded with /multistream/1.0.0 before rejecting it due to missing TLS authentication. That confirms that libp2p expects the multistream handshake before establishing an mTLS connection.

If you want to test proper mTLS authentication, you should modify your Python client to complete the multistream negotiation first before attempting mTLS authenti…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@MOHANKUMAR-IT
Comment options

@ousloob
Comment options

Answer selected by MOHANKUMAR-IT
Comment options

You must be logged in to vote
1 reply
@MOHANKUMAR-IT
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants