Create users into gerrit DB

104 views
Skip to first unread message

Manuel Vacelet

unread,
May 23, 2013, 5:52:51 AM5/23/13
to repo-d...@googlegroups.com
Hi all,

I'm struggling with LDAP full of people with space in uid.
I successfully managed to use "accountSshUserName = ${mail.localPart}" directive and it works well the first time people log themselves on the platform.

However, I want to automate creation of user groups before they log.

It's working great with "normal" LDAP (no space in uid) and gerrit configured to use "uid" as accountSshUserName. I only have to do a "set-account" with the uid and the account is automatically created.

But as soon as I switch to "accountSshUserName = ${mail.localPart}". I cannot use that trick. I tried to set-account with email, email localPart, full name, uid with spaces (with or without escaping). I always get "fatal, user not found".

The last resort I seems to have is to directly create the account inside the database with gsql. Is that safe to proceed this way or is there other places where user account informations are stored ?

I'm using gerrit 2.5.3.

--
Twitter: @vaceletm

Luca Milanesio

unread,
May 23, 2013, 8:22:53 AM5/23/13
to Manuel Vacelet, repo-d...@googlegroups.com
Hi Manuel,

usage of GSQL for inserting records into Gerrit DB "behind his back" can be dangerous and not portable across different Gerrit releases.

The User account management is going to change once the auth-backend will be merged.

Are you targeting specifically and only 2.5.x ?

Luca



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Manuel Vacelet

unread,
May 23, 2013, 10:26:34 AM5/23/13
to Luca Milanesio, repo-d...@googlegroups.com
Hi Luca,

I'm not targeting specifically 2.5.x if starting with another version is game changing. Is it ?

I do understand that playing with GerritDB directly is a bad idea and I try to avoid as much as possible.
What I'd like to understand is: behind being not compatible with the future, is it safe to do it ?

Manuel
--
Twitter: @vaceletm

Patrick Renaud

unread,
May 23, 2013, 11:14:21 AM5/23/13
to Manuel Vacelet, Luca Milanesio, repo-d...@googlegroups.com
Manuel, 

We (Ericsson) plan to start working on adding the missing gerrit-ssh CLI commands for group management, for example. It's in our dev team's backlog and due for September if I am not mistaken. This way Tuleap won't need to do GSQL calls anymore for adding/removing members of a group in Gerrit. 

Is this what you are struggling with?

/Patrick

Manuel Vacelet

unread,
May 23, 2013, 2:39:27 PM5/23/13
to Patrick Renaud, Luca Milanesio, repo-d...@googlegroups.com
Salut Patrick,

It's good news (I kinda hate struggling with gsql).
But in our case (another big telecom player at $DAYJOB) it will not be really helpful.

We have to solve a problem with a "special" LDAP that contains:
- ldap entries with uid that contains spaces (and single quotes!)
- ldap entries without email

Given those 2 constraints we still try to pre-populate gerrit user accounts and groups group membership from Tuleap.

It's the marvelous world of ldap where every single LDAP is different one from another in delightful and subtle ways (you cannot imagine how LDAP adminitrators can be smart/vicious) and integrators have to deal with all shitty details.

Manuel, sad

--
Twitter: @vaceletm
Reply all
Reply to author
Forward
0 new messages