Commit Graph

196 Commits

Author SHA1 Message Date
František Zatloukal
9f273622e0 Blockerbugs: force to use local user instead of the ipa one 2021-06-09 19:14:13 +02:00
Kevin Fenzi
48e22151ae ipa/client: flush handlers at the end of ipa/client
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-24 15:24:40 -07:00
Kevin Fenzi
cd50797995 ipa / client: actually install the ignore conf file as .conf instead of .conf.j2
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-24 14:54:35 -07:00
Kevin Fenzi
52a197735b ipa/client: split out these groups
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-22 10:36:20 -07:00
Kevin Fenzi
1c6dfc82fd ipa/client: no comment in this jinja2 sadly, just make this a normal comment
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-22 10:26:50 -07:00
Kevin Fenzi
24ae7d3d16 ipa / client: rework the excluded local users from sssd
There's a real user 'mock' who we want to allow on ipsilon (so they can
login to anything) and people02 (so they can get to their people space),
but no where else, since we ened the local mock user on places like
builders, etc.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-21 12:51:32 -07:00
Tomas Hrcka
fb395d74a2 Update sssd config to filter users bodhi and ftpsync
Signed-off-by: Tomas Hrcka <thrcka@redhat.com>
2021-05-13 20:59:17 +00:00
Kevin Fenzi
7b93c69d29 ipa / server: fix delegations
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-10 11:51:16 -07:00
Kevin Fenzi
6b1feadf4f ipa / server: only install the stage user cleanup on 01
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-10 11:43:00 -07:00
Aurélien Bompard
86567270dc The keytab path is hostname-dependant
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-07 10:12:11 +02:00
Aurélien Bompard
bfe6cf9d02 Only run the cron job on one server
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-07 09:34:27 +02:00
Aurélien Bompard
abaf67b66c Adjust the keytab location to the service
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-07 09:16:16 +02:00
Aurélien Bompard
551ba9bd39 Oops.
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-06 19:04:34 +02:00
Aurélien Bompard
f1e9387759 Finally, use a service for the stage users cleanup script
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-06 19:02:38 +02:00
Aurélien Bompard
3ddc3934da Add a periodic cleanup script for stage users
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-06 13:59:21 +02:00
Aurélien Bompard
3719dff88e Add some missing tags
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-05-06 13:58:40 +02:00
Mark O'Brien
2649c23c52 ipa: add env_suffix for stg 2021-05-06 12:30:29 +01:00
Kevin Fenzi
0cf61ae919 ipa / client: do not exclude mock ipa user on people02
We have a legit user who has the 'mock' account. So, we allow the ipa
one to override on people02 (since they have a shell account there), but
keep the filer everywhere else where we may run 'mock' the command.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-05 16:04:32 -07:00
Kevin Fenzi
8d20a480c2 ipa/client: add apache to ignore for sssd
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-04 14:34:22 -07:00
Kevin Fenzi
6e6dbc0581 ipa/client: ignore 'mock' ipa/fas user and use local one.
There's a actual legit person with a fas account of 'mock'
We don't want to use their account, we want to use the local mock user
instead.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-04 13:16:34 -07:00
Aurélien Bompard
809635c923 Improve the IPA backup process
Fixes: https://pagure.io/fedora-infrastructure/issue/9916

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-04-30 10:35:33 +02:00
Mark O'Brien
b51c4a5c7b ipa: need more modules enabled 2021-04-23 15:33:35 +01:00
Mark O'Brien
7952914916 ipa: enable correct idm module stg 2021-04-23 12:30:13 +01:00
Kevin Fenzi
6e1ab9cd21 ipa / client: setup nopasswd sudo groups for maintainer test
For the maintainer_tests instances we just want to allow anyone with
shell access ability to sudo with no password. In this case asking for
password/tokens could provide a MITM attack vector. This matches up with
the way they were setup before with fas2.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-04-21 16:18:47 +00:00
Mark O'Brien
cba637c5c2 ipa: otp script fix dest name 2021-04-15 21:01:46 +01:00
Mark O'Brien
d3927bb3c9 ipa: otp script add tags 2021-04-15 20:29:58 +01:00
Mark O'Brien
ecf0dadc3b add script 2021-04-15 18:23:12 +00:00
Mark O'Brien
b8515e6bce ipa: add script to check which sysadmins do not have otp tokens 2021-04-15 18:23:12 +00:00
Kevin Fenzi
cc736849e2 ipa/client: split out prod and stg ipa user/group ignore file
We need to also add mock to sssd ignore groups/users, but for now since
we are frozen, only do this in staging. After freeze, we should merge
this back into one file.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-04-08 17:15:51 -07:00
Nils Philippsen
05f399851e ipa/client: Don't apply hosts role on non-VPN hosts
We don't want a custom /etc/hosts installed on every host, so bring back
the conditional.

Improves commit 7a2024398f.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-04-02 00:13:18 +02:00
Nils Philippsen
7a2024398f hosts: do the right thing for VPN hosts
Move the vpn ./. base logic from the ipa/client role into the hosts
role, so that applying the latter doesn't apply the base profile on VPN
hosts.

Fixes: fedora-infrastructure#9822

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-04-01 16:31:59 +02:00
Kevin Fenzi
f3eb7ccaf8 ipa / client / sssd: ignore the named user in ipa as well to make named work on nameservers
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-31 17:09:02 -07:00
Kevin Fenzi
85ac490787 ipa / server / backups: only send errors to cron emails
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-27 10:42:40 -07:00
Stephen Smoogen
14d9cbde02 put the task in a job which will run on the right system 2021-03-27 12:40:47 -04:00
Stephen Smoogen
48dc00ae84 Add a deep clean which restarts sssd and then cleans the cache in case of major config file changes 2021-03-27 12:28:48 -04:00
Stephen Smoogen
f7519b408b Allow sssd to ignore special users
Currently /etc/nsswitch.conf has configurations like

passwd:     sss files
shadow:     files sss
group:      sss files

The problem is that to make sure that certain users could not be
created in IPA (like nobody root etc), they were already created but
in a restricted group. In order to allow sss to work for postfix, nfs,
nobody and such, the sssd.conf needs to ignore them in the nss
section. This adds a file which will do that.

Signed-off-by: Stephen Smoogen <smooge@smoogespace.com>
2021-03-27 12:20:35 -04:00
Nils Philippsen
f9abb293c0 ipa/client: only warn about essential vars missing
If either `ipa_client_shell_groups` and `ipa_client_sudo_groups` are
unset or empty, sysadmin-main will still be able to login and sudo.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-25 20:22:30 +00:00
Stephen Smoogen
a781368708 Add a --no-ssh to the ipa-client-install so that sshconfigs on clients are not altered.
Signed-off-by: Stephen Smoogen <smooge@smoogespace.com>
2021-03-25 11:37:24 -04:00
Nils Philippsen
46b3fb9390 ipa/client: Revamp combining shell groups
The previous implementation didn't work because of a chicken-and-egg
problem: To add the batcave shell groups to those specifically for
bastion, it needs to look them up, but they aren't set yet (probably
because `batcave` comes after `bastion`).

Now, one can (optionally) set `ipa_client_shell_groups_inherit_from`, a
list of Ansible group names whose `ipa_client_shell_groups` will be
combined with that of the host itself. This is more robust because it's
done late, after variables are set from the inventory.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-25 13:53:21 +01:00
Stephen Smoogen
34728c85cd put in clean up scripts to remove fas-client cron job which bollocks systems 2021-03-25 07:17:53 -04:00
Nils Philippsen
bcfe96b710 ipa/client: Enable VPN hosts to talk to IPA
This requires the canonical names of IPA servers to be mapped to their
IP addresses on the VPN as well as specifying the IPA server explicitly
when enrolling clients.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-24 18:19:11 +01:00
Nils Philippsen
28cc2e8d93 ipa/client: specify ipa server when enrolling VPN hosts
This is needed for clients that cannot access the internal DNS
where IPA servers are announced.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-24 18:18:55 +01:00
Nils Philippsen
23e6678997 ipa/client: cease masking tasks for prod hosts
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-24 13:44:32 +01:00
Mark O'Brien
e32c6c21b9 create daily data only backups of ipa 2021-03-23 18:06:38 +00:00
Aurélien Bompard
2269f0ece1 Prepare Noggin & FASJSON for prod
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-03-22 17:53:42 +00:00
Nils Philippsen
3abcb2d011 ipa/client: clean sss caches on changes
SSSD caches information, some types for hours by default. When changing
anything in IPA pertaining to a host this role is applied to, clean out
the caches on the host so the changes are effective immediately.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-19 09:27:51 +00:00
Nils Philippsen
b78fbabd71 ipa/client: repair nsswitch.conf post-FAS
The `fas_client` role installed a version of nsswitch.conf which doesn't
delegate to sss. For some reason, ipa-client-install doesn't ensure this
is brought back. This prepends `sss` to lines where it would be missing
otherwise. Also, run the cleanup tasks before the enrollment task.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-09 17:04:09 +00:00
Nils Philippsen
23a7607dab ipa/client: fix adding hosts to host groups
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-09 17:54:29 +01:00
Nils Philippsen
c43010514c ipa/client: Fix warning about legacy vars
This needs to be run per every host in the play.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-05 17:12:32 +01:00
Aurélien Bompard
f17dc57b43 Create the sysadmin-main group in IPA
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-02-22 10:26:01 -05:00