Skip to content

Conversation

asimarslan
Copy link
Contributor

Client SSL/TLS mutual authentication support implementation and tests

@asimarslan asimarslan added this to the 3.10 milestone Dec 4, 2018
@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@asimarslan
Copy link
Contributor Author

verify

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests PASSed.

Client = HazelcastClient.NewHazelcastClient(clientConfig);
}

private static SSLConfig CreateSslConfig(bool isSslEnabled, bool? validateCertificateChain, bool? validateCertificateName,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool?
What is the purpose of making a bool Nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null represents default values of the related configuration

sslStream.AuthenticateAsClient(certificateName, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
if (!sslStream.IsMutuallyAuthenticated && clientCertificates.Count > 0)
{
throw new CryptographicException("Mutual authentication failed.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the mutual authentication is not set in the member side but the client provided a client certificate ? It is clearly a configuration mismatch but there is nothing wrong in this scenario apart from that. Also, java client doesn't fail with this type of configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.net framework and net core behaviors are different so I'll remove the check.

{
/// <summary>
/// Certifate Name; CN part of the Certificate Subject.
/// Certificate Name; CN part of the Certificate Subject.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the SAN field ? Can the client validate certificates which doesn't have a CN but SAN field ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is builtin supported by .NET. I'll fix the doc

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows Net Core Tests PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows .Net Framework Tests PASSed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants