Skip to content

acme module fails to set file permissions if the certificate is already present #48626

Closed

Description

@nicoonoclaste

Description of Issue/Question

Setup

somegroup:
  group.present

some.example.com:
  acme.cert:
    - email: [email protected]
    - group: somegroup

Steps to Reproduce Issue

  1. Run the above state file without the group: somegroup parameter.
  2. Once the certificate is acquired (successful highstate), add the group parameter.
  3. Highstate the minion. The module reports nothing changed, and the private key file is indeed still owned by group root.

Versions Report

2018.3.2, but looking at the code suggests that it's still present in develop.

$ salt --versions-report
Salt Version:
           Salt: 2018.3.2
 
Dependency Versions:
           cffi: 1.10.0
       cherrypy: 3.2.2
       dateutil: 2.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.14 (default, May  2 2018, 18:31:34)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 4.14.51-60.38.amzn1.x86_64
         system: Linux
        version: Not Installed

Activity

  1. AstraLuma commented on Jul 17, 2018

    @AstraLuma
    Contributor

    This seems to happen because of https://github.com/saltstack/salt/blob/v2018.3.2/salt/modules/acme.py#L172-L175 where it just exits if acme does nothing instead of checking the group.

  2. Ch3LL commented on Jul 18, 2018

    @Ch3LL
    Contributor

    Thanks for the PR! As it looks like your PR does indeed fix the issue I will close this issue and keep the conversation in the PR but let me know if this needs to be re-opened.

  3. added
    bug
    severity-medium
    P4
    on Jul 18, 2018
  4. added this to the Approved milestone on Jul 18, 2018
  5. added a commit that references this issue on Jul 26, 2018
    941bbd7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4bugseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions