Skip to content

Bug fixes in the acme module & state - #48635

Merged
cachedout merged 6 commits into
saltstack:2017.7from
nicoonoclaste:acme
Jul 22, 2018
Merged

cachedout merged 6 commits into
saltstack:2017.7from
nicoonoclaste:acme

Conversation

@nicoonoclaste

Copy link
Copy Markdown
Contributor

What does this PR do?

What issues does this PR fix or reference?

#48626, #48626

Previous Behavior

  • acme.cert fails to set private key file permissions if the certificate is already present;
  • acme.cert sets the private key file mode to 0600, making the specified group unable to read the private key.

New Behavior

  • acme.cert sets the private key file permissions at all times;
  • acme.cert sets the private key file mode to 0640, unless overrode by the (optional) mode parameter.

Tests written?

No

Commits signed with GPG?

Yes

@nicoonoclaste

Copy link
Copy Markdown
Contributor Author

I was unable to test this change properly yet (due to some issues in the CI/CD pipeline we are using, it turns out overriding modules is tricky), but I will report back as soon as this is tested.

@nicoonoclaste

Copy link
Copy Markdown
Contributor Author

The CI failure seems to be unrelated, as acme does not appear in the log (except for the commit message)

@cachedout

Copy link
Copy Markdown
Contributor

Is the addition of the mode argument necessary to correct either of the defects in #48626 or #48627? Typically we like to reserve new functionality for major releases.

@nicoonoclaste

nicoonoclaste commented Jul 18, 2018 •

Copy link
Copy Markdown
Contributor Author

@cachedout It's in principle not required (in so far that we can hardcode 0640 instead of 0600 and give no way to configure it), but it seemed reasonable to add while I was at it, given that it's an extremely minor change, it is quite useful, and it gives an escape hatch if some user wants the previous behavior for some reason.

Should I make a separate PR (against develop?) for it? How would that work without creating a merge conflict when 2017.7 gets forward-merged?

@nicoonoclaste

Copy link
Copy Markdown
Contributor Author

BTW, @astronouth7303 tested the patched module yesterday, and it works as expected.

@cachedout

Copy link
Copy Markdown
Contributor

@nbraud Seems like a reasonable explanation. Thanks!

@cachedout
cachedout merged commit 83e4bba into saltstack:2017.7 Jul 22, 2018
@nicoonoclaste
nicoonoclaste deleted the acme branch December 11, 2018 21:28
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.

3 participants