On Tue, Nov 28, 2023 at 10:13:35AM +0000, Mattia Verga via devel wrote:
I'd like to start writing a script to synch users/groups from
Fedora IPA
to pagure.io and src.fp.o: both pagure.io and src.fp.o logins are based
on Fedora accounts, but the Pagure user database is only updated when a
user login in Pagure.
Yeah, there was a script for fas2:
https://pagure.io/pagure-utility/blob/master/f/sync_fas_group_membership.py
But I guess that would need to be ported to current.
That means that by searching for a user or looking group memberships
in
Pagure we don't have an updated, real view of what we have in IPA. With
the old FAS system there used to be a synch script provided by
pagure-dist-git plugin, so I plan to use that as the base for a new
synch script from IPA.
However, before digging in how (and if) is possible to add new users
using pagure libraries, I'd like to ask if it would be acceptable to
"copy" user data from one database to another (except passwords, which
remain in IPA only). We will need to pass username, full name, email and
group memberships from IPA to pagure.io/src.fp.o, which is what is done
when a user logs in for the first time.
If that's not acceptable, I think I can just only update group
membership for users already in pagure database.
Thoughts?
There was some renewed interest in syncing things not long ago, at least
for pagure.io groups. See:
https://pagure.io/fedora-infra/toddlers/issue/177
Note that that needs a upstream pending pr to be merged, a new release
cut and us to update to it to get the api endpoint.
kevin