Skip to content
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

Added Capability for Dotnetty to use Thumbprint for SSL #3629

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

to11mtm
Copy link
Member

@to11mtm to11mtm commented Oct 19, 2018

In certain environments, it is preferred to have certificates installed on the local machine by system administrators, and having applications use said certificates via thumbprint.

This pull request contains changes to allow thumbprints to be used by dotnetty,, via a new set of configuration options; backwards compatibility is maintained by this being 'opt in' behavior.

Copy link
Member

@Danthar Danthar left a comment

Choose a reason for hiding this comment

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

Left some comments on the tests

public void Secure_transport_should_be_possible_between_systems_using_thumbprint()
{
// skip this test due to linux/mono certificate issues
if (IsMono) return;
Copy link
Member

Choose a reason for hiding this comment

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

hmm. I think we would much rather have this test just run on mono/linux. And have us manually suppress the test in our CI env. Then let it silently complete as if everything is ok. @Aaronontheweb your thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

@Danthar unfortunately, skipping specific tests in some environments from within our build script is really tricky. We do this type of short-circuiting elsewhere inside the Akka.Remote test suite for the same reason.

While I agree it's not 100% clean, it's probably the best route for getting the job done.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

The code itself looks good to me, but the default HOCON needs some cleaning up before we merge this


thumpbrint = ""

store-name = "My"
Copy link
Member

Choose a reason for hiding this comment

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

Leave this setting to empty, but also add a comment describing what it does

Copy link
Member Author

Choose a reason for hiding this comment

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

Will Do. Will also do the same for store-location.

Speaking of which, should I clear the default of 'local-machine' for the store location? (At the very least, after consideration, 'current-user' is probably a better default if any.)

Copy link
Member

Choose a reason for hiding this comment

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

@to11mtm going to ask a clarifying question here because I don't know the answer: why is current-user a better default?

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose it depends on one's environment.

current-user indicates that the certificate is in the user's (i.e. account the app is running under) store.

local-machine indicates a certificate that is in the machine's store. Local Machine can be cleaner if you've got different profiles that need to use the same cert, but conversely speaking means you need permissions to install a machine-level cert.

FWIW, 'local-machine' would be an analogue to the 'machine-key-set' option for a file cert, and 'current-user' would be an analogue to 'user-ket-set' (and, in most cases, 'default-key-set'.)

@Aaronontheweb
Copy link
Member

Aaronontheweb commented Oct 25, 2018 via email

@to11mtm to11mtm force-pushed the dotnetty-ssl-thumbprint branch from d0c98c9 to 78769ea Compare October 25, 2018 00:09
@to11mtm to11mtm force-pushed the dotnetty-ssl-thumbprint branch from 78769ea to b5e435a Compare October 25, 2018 00:11
@to11mtm
Copy link
Member Author

to11mtm commented Oct 25, 2018

Changes made+squashed.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Aaronontheweb Aaronontheweb merged commit b133d97 into akkadotnet:dev Oct 25, 2018
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.

4 participants