We’re using the SAML plugin for MFA along with Azure AD groups to manage project access in Gerrit. However, we’ve noticed a synchronization issue between Azure AD groups and the corresponding local Gerrit groups.
When we add a user to an Azure AD group, they are correctly added to the matching local Gerrit group (with the prefix saml/). But when a user is removed from the Azure AD group, they still remain in the corresponding local Gerrit group.
Our setup:
Gerrit version: 3.11.2
SAML plugin: master branch
Is this a known issue or some configuration that we could have missed?
Best Regards,
Kiran
Groups do not get updated until the next UI based login event with SAML
based access. The reason is that SAML has no sort of events outside of
the login where the SAML authentication and authorization server is
communicated with. Logout events don't even talk to the server in most
cases.
I can see how this might cause problems in a couple of cases:
When someone switches teams: If they move to a team that doesn’t use Gerrit, they’re removed from the Azure AD groups. But since they never log back into Gerrit, they end up staying in the local Gerrit groups.
When someone leaves the company: Their Azure AD access gets removed, but their Gerrit account and group memberships remain since they’ll never log in again. And if Gerrit is exposed on the internet, they could still use their HTTP credentials to get in.
On 1 Sep 2025, at 13:47, Kiran Shinde <kkiran...@gmail.com> wrote:
On Sunday, 31 August 2025 at 22:32:44 UTC+2 Andrew Grimberg wrote:Groups do not get updated until the next UI based login event with SAML
based access. The reason is that SAML has no sort of events outside of
the login where the SAML authentication and authorization server is
communicated with. Logout events don't even talk to the server in most
cases.I can see how this might cause problems in a couple of cases:
When someone switches teams: If they move to a team that doesn’t use Gerrit, they’re removed from the Azure AD groups. But since they never log back into Gerrit, they end up staying in the local Gerrit groups.
When someone leaves the company: Their Azure AD access gets removed, but their Gerrit account and group memberships remain since they’ll never log in again. And if Gerrit is exposed on the internet, they could still use their HTTP credentials to get in.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/6690a17f-e448-4c0e-9934-f4eafa1afa13n%40googlegroups.com.
Hi Kiran,On 1 Sep 2025, at 13:47, Kiran Shinde <kkiran...@gmail.com> wrote:
On Sunday, 31 August 2025 at 22:32:44 UTC+2 Andrew Grimberg wrote:Groups do not get updated until the next UI based login event with SAML
based access. The reason is that SAML has no sort of events outside of
the login where the SAML authentication and authorization server is
communicated with. Logout events don't even talk to the server in most
cases.I can see how this might cause problems in a couple of cases:
When someone switches teams: If they move to a team that doesn’t use Gerrit, they’re removed from the Azure AD groups. But since they never log back into Gerrit, they end up staying in the local Gerrit groups.
Yes, exactly. I recall to have objections when the “automation of creating Gerrit groups” from SAML was merged.My feedback was exactly that one: you are granting permissions without the ability to remove them automatically.
When someone leaves the company: Their Azure AD access gets removed, but their Gerrit account and group memberships remain since they’ll never log in again. And if Gerrit is exposed on the internet, they could still use their HTTP credentials to get in.
The situation is even worse: if the user is authenticating with SSH, he may be even disabled completely but will still be able to authenticate and access the projects.IMHO the Group integration with SAML is very risky and incomplete and should not be used as-is.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/557F6A1E-87B9-407E-A9A3-C79C35D3956A%40gmail.com.
> We set saml.forceAuth = true in gerrit.config to force reauthentication with the IDP when the gerrit session expires.
Yes, but what about the Git/SSH or Gerrit/SSH connections?
AFAIK that won’t force any reauthentication via SAML.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/A623CEFC-FEB8-4EEF-9E48-9E82EB502A6A%40gmail.com.