-
Notifications
You must be signed in to change notification settings - Fork 2
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(10-042): Limit user lookups to "local" NSS passwd databases #29
Conversation
Sadly this change doesn't work with the veryvery sadly-old centos7 systems apparently still using python2.7:
(BTW, note to myself: In this case the |
By default, only users from files, compat, db and systemd backends are enumerated. If other backends are active, a warning is emitted. Adds an option for chaning the set of backends Also emits a warning if AuthorizedKeysCommand is enabled.
45100df
to
5202337
Compare
@Melkor333 should be fixed now, please check again |
Tested it and works now, thanks! One thing though: There's also the warning "[WARNING]: AuthorizedKeysCommand is configured: "/usr/bin/sss_ssh_authorizedkeys". Keys returned by this command are not audited." Can this warning be "acknowledged" so that the check will return OK or is the idea that the check should just be completely disabled in case an |
Why should it report OK? The task knows there is a portion of users it is not scanning, who can potentially sign in. I don't think it's wise to let the automated task decide whether that's actually ok; that decision should be made by an admin.
Is it? Enumerating all sss users and scanning their authorized_keys leads to people starting to wonder why the playbook "hangs". Even in the issue report (#28), @adf-patrickha had to resort to strace'ing the ansible execution in order to figure out what was going on. Because of this I think it should be a conscious decision to scan all user homes.
Again, the idea is that the admin should decide what to do in this case. And in the case of this task ( |
Yeah in case of
If you need to manually disable It's just in reality that any task which has be evaluated every time during maintenance (and might overwhelm the admin) is bringing the users further towards "meh I'll just ignore the checks, I don't think anything bad happened here" which is currently a bit of a bad practice. Could we maybe just change the message from (Btw. the warning threw me off quite a bit since the actual variable to be set is |
This is not the intent of the But I think I now understand your motivation. I'd propose to augment
What are you thoughts on this @Melkor333 @SaschaD-Adfinis? |
…ces warnings about skipped backends
By default, only users from
files
,compat
,db
andsystemd
backends are enumerated. If other backends are active, a warning is emitted. This behavior can be customized with the newlimit_nss_backends
module parameter and thelinux_allowed_ssh_nss_backends
Ansible variable. Closes #28.Also emits a warning if AuthorizedKeysCommand is enabled.