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

Implements HTTPS support for hieraserver #60

Merged
merged 2 commits into from
Jan 13, 2020

Conversation

flashvoid
Copy link
Contributor

Hello

I suggest enabling hieraserver to run in HTTPS configuration since it is likely to be serving secrets.

Copy link
Contributor

@thallgren thallgren left a comment

Choose a reason for hiding this comment

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

Great improvement with https! Implementation looks good aside from my nitpicks.


var err error
var tlsConfig *tls.Config
tlsConfig, err = makeTLSconfig()
Copy link
Contributor

Choose a reason for hiding this comment

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

Please skip preceding var declarations and use :=.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

certPool := x509.NewCertPool()
ok := certPool.AppendCertsFromPEM(data)
if !ok {
return nil, fmt.Errorf("Failed to load certificate %s", pemFile)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use %q to quote the path as it's not uncommon that it contains spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@thallgren thallgren merged commit 27048d2 into lyraproj:master Jan 13, 2020
ahpook pushed a commit to ahpook/gohiera that referenced this pull request Jan 16, 2020
Prior to this commit, changes in lyraproj#60 caused an initialized
but non-functional tlsConfig object to skip the non-SSL
listener startup, which would fail.

There might be a more sophisticated fix, but this wfm...

Fixes lyraproj#62
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.

2 participants