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

Fix #1617 Add dh_params resource #1618

Merged
merged 3 commits into from
Apr 4, 2017

Conversation

4-20ma
Copy link
Contributor

@4-20ma 4-20ma commented Apr 1, 2017

Signed-off-by: Doc Walker 4-20ma@wvfans.net

Signed-off-by: Doc Walker <4-20ma@wvfans.net>
Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

@4-20ma This is an awesome improvement. Thank you!

@chris-rock chris-rock requested a review from adamleff April 3, 2017 12:53
@arlimus
Copy link
Contributor

arlimus commented Apr 3, 2017

Oh super nice @4-20ma thank you!!

@adamleff
Copy link
Contributor

adamleff commented Apr 3, 2017

@4-20ma this totally rocks. I'll be reviewing this later today and likely get it merged! Nicely done!

@@ -19,6 +19,7 @@
include_recipe('os_prepare::iis_site')
include_recipe('os_prepare::iptables') unless node['osprepare']['docker']
include_recipe('os_prepare::x509')
include_recipe('os_prepare::dh_params')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Normally I'd add this line in alphabetical order, but the existing recipes are already out of order. Let me know if this requires adjustment.

Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't matter - this is fine :)

@@ -138,6 +138,8 @@ def md.directory?
'test_certificate.rsa.crt.pem' => mockfile.call('test_certificate.rsa.crt.pem'),
'test_certificate.rsa.key.pem' => mockfile.call('test_certificate.rsa.key.pem'),
'test_ca_public.key.pem' => mockfile.call('test_ca_public.key.pem'),
# Test DH parameters, 2048 bit long safe prime, generator 2 for dh_params in PEM format
'dh_params.dh_pem' => mockfile.call('dh_params.dh_pem'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Normally I'd add this line in alphabetical order, but the existing recipes are already out of order. Let me know if this requires adjustment.

Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't matter - this is fine :) We should totally alphabetize these though for ease.

@4-20ma
Copy link
Contributor Author

4-20ma commented Apr 3, 2017

@chris-rock, @arlimus, @adamleff thanks for the support/consideration. Let me know if there are any tweaks you'd like to see. I wasn't sure what order to include some of the tests/helpers. Refer to my comments in the Files Changed tab.

@adamleff adamleff added the Type: Enhancement Improves an existing feature label Apr 3, 2017
Copy link
Contributor

@adamleff adamleff left a comment

Choose a reason for hiding this comment

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

@4-20ma this is super, nicely done.

I just had a comment on the p and g method aliases you created. While they make sense if you're familiar with DH parameters, since we don't document them, I'm inclined to ask they be removed. What are your thoughts?

end

# its('g') { should eq 2 }
alias g generator
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm inclined to suggest removing these since they're not documented and we don't have a pattern of including aliases in other resources that I'm aware of.

Copy link
Contributor

Choose a reason for hiding this comment

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

We try to avoid those in most cases. In this case it makes sense to have them, but if we keep them, we should document those.

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 have no issue removing them; simplicity is a good thing.

end

# its('p') { should eq '00:91:a0:15:89:e5:bc:38:93:12:02:fc:...' }
alias p modulus
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm inclined to suggest removing these since they're not documented and we don't have a pattern of including aliases in other resources that I'm aware of.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the project preference for this change? Should I rebase and do a forced push? Or simply push a new commit?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we have an official one. 🙂 I'd ask that you just push up a new commit. If there's more than 2 or 3 commits, I'll squash before merge on your behalf.

Copy link
Contributor

Choose a reason for hiding this comment

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

It just makes reviewing changes between review exchanges SO much easier!

Signed-off-by: Doc Walker <4-20ma@wvfans.net>
Signed-off-by: Doc Walker <4-20ma@wvfans.net>
@adamleff
Copy link
Contributor

adamleff commented Apr 4, 2017

Again, @4-20ma... thank you for the great contribution to InSpec!

@adamleff adamleff merged commit 692e660 into inspec:master Apr 4, 2017
@4-20ma 4-20ma deleted the 1617-dh-params-resource branch April 4, 2017 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants