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

[SYSTEXT-1044] Add RHEL 2FA support #2

Merged
merged 10 commits into from
Jun 7, 2023
Merged

[SYSTEXT-1044] Add RHEL 2FA support #2

merged 10 commits into from
Jun 7, 2023

Conversation

opserve-menno
Copy link

This is pull request #229 with some additional fixes.

This includes a workaround for Salt's selinux.fcontext_policy_present state and makes sure we replace the 2FA code if updated in the pillar.

@opserve-menno opserve-menno self-assigned this May 12, 2023
@opserve-menno
Copy link
Author

This shouldn't be merged without a good review and some additional testing.

users/googleauth.sls Show resolved Hide resolved
selinux.fcontext_policy_present only works once, if the policy is
already present the salt state errors, add an unless statement to
check if the policy is already in place.

Error:
  ----------
            ID: users_googleauth_selinux_present
      Function: selinux.fcontext_policy_present
          Name: /etc/google_authenticator.d(/.*)?
        Result: False
       Comment: Error adding new rule: {'pid': 10389, 'retcode': 1, 'stdout': '', 'stderr': 'ValueError: File context for /etc/google_authenticator.d(/.*)? already defined'}
       Started: 07:14:38.736705
      Duration: 609.271 ms
       Changes:
When we set replace to false we only generate an initial config and
changes to the pillar are never applied, set replace to true to fix
this.
@opserve-menno opserve-menno merged commit 15c698f into master Jun 7, 2023
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