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

googleauth: RHEL support #229

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

unilogicbv
Copy link
Contributor

@unilogicbv unilogicbv commented Jun 13, 2022

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

Related issues and/or pull requests

Describe the changes you're proposing

1dcd7d5 is a small refactor, which provides groundwork for RHEL support, without actually adding any RHEL specific changes.
52c3520 adds RHEL (and derivatives) support

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

Tested on Ubuntu 20.04, CentOS 7 and Rocky 8.

@myii
Copy link
Member

myii commented Jun 13, 2022

@unilogicbv The jobs are failing because of duplicate state IDs being introduced. Each failing job has the debug output at the top which can help you figure out what is going on. Taking this failing run between lines 1414 and 2036, here's a simplified version, to help clarify the problem:

[DEBUG   ] Rendered data from file: /tmp/kitchen/var/cache/salt/minion/files/base/users/init.sls:

...
  
users_/etc/sudoers.d/auser:
  file.absent:
    - name: /etc/sudoers.d/auser

policycoreutils-package:
  pkg.installed:
    - pkgs:
      - policycoreutils
      - policycoreutils-python

users_googleauth_selinux_present:
  selinux.fcontext_policy_present:
    - name: "/etc/google_authenticator.d(/.*)?"
    - filetype: 'a'
    - sel_user: unconfined_u
    - sel_type: ssh_home_t
    - sel_level: s0
    - require:
 - pkg: policycoreutils-package

...

users_/etc/sudoers.d/buser:
  file.managed:
    - replace: True
    - name: /etc/sudoers.d/buser
    - contents: |
        ...

policycoreutils-package:
  pkg.installed:
    - pkgs:
      - policycoreutils
      - policycoreutils-python

users_googleauth_selinux_present:
  selinux.fcontext_policy_present:
    - name: "/etc/google_authenticator.d(/.*)?"
    - filetype: 'a'
    - sel_user: unconfined_u
    - sel_type: ssh_home_t
    - sel_level: s0
    - require:
 - pkg: policycoreutils-package

...

[CRITICAL] Rendering SLS 'base:users' failed: while constructing a mapping
  in "<unicode string>", line 10, column 1
found conflicting ID 'policycoreutils-package'
  in "<unicode string>", line 369, column 1

So both the policycoreutils-package and users_googleauth_selinux_present states are being duplicated per user, when that wasn't the case beforehand. So you'll need to look at the changes you've made that have introduced that.

@unilogicbv
Copy link
Contributor Author

Is there anything I need to clarify in order to get this pull request reviewed?

@opserve-menno
Copy link

I've noticed there hasn't been any action on this pull request for a little while now, I was wondering if there is anything that needs to be done or clarified to get this request merged?

I'm able to test this as I'd like to deploy this to a few CentOS 7/8 based servers.

opserve-menno added a commit to opservenl/users-formula that referenced this pull request May 12, 2023
This merges pull request saltstack-formulas#229 (googleauth: RHEL support)
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