•  
     
    story #7322 retrieve user membership from master
Summary
git mirror admin
retrieve user membership from master
authentication works
  • Mandate a php5.3+ server
  • New RPM package (tuleap-gitolite-membership)
  • After install, there is a configuration in /etc/tuleap-gitolite-membership/conf with
    • Tuleap master server
    • User to use for authentication
    • Password for this user
  • Then a call to /usr/bin/tuleap-gitolite-membership john_doe returns the list of usergroups john_doe belongs to
  • The rest token is persisted

Notes:

  • The user to use for authentication is probably the same than the one defined for mirroring stuff in story #....
Nouha Terzi (terzino), Denis PILAT (denis_pilat)
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#7322
Manuel Vacelet (vaceletm)
2014-10-06 11:29
2014-08-08 10:22
3208

References

Follow-ups

User avatar
Great !

Anyhow, it's now shipped in Tuleap repository, no longer need of manual install of rpm

  • Category set to
User avatar
Nouha Terzi (terzino)2014-10-06 10:56
Yes, it did for both now tuleap.net and crx19007.cro.
I had to reinstall the rpm "par simple superstition", and it is working well now!
User avatar
What if you do the same thing (using terzino as a user in /etc/tuleap-gitolite-membership.ini) and tries to fetch info from tuleap.net ?

FYI, I just made the test:
- using the rpm in this artifact
- using vaceletm in /etc/tuleap-gitolite-membership.ini
- /usr/share/tuleap-gitolite-membership/tuleap-gitolite-membership.php -vvv vaceletm

And it works !
User avatar
"a given user" => which user did you add in the permission delegation and which user is configured in /etc/tuleap-gitolite-membership.ini ?
User avatar
Nouha Terzi (terzino)2014-10-03 15:48
please note that even after adding a given user to the delegation permission, I still got this error:

[debug] Raw response from the server: [
{
"id": 12541,
"uri": "users/12541",
"email": "nouha.terzi@st.com",
"real_name": "Nouha TERZI",
"username": "terzino",
"ldap_id": "ed338678",
"avatar_url": "https://crx19007.cro.st.com/users/terzino/avatar.png"
}
]
[debug] GET /api/v1/users/12541/membership
[debug] Client error response
[status code] 403
[reason phrase] Forbidden
[url] https://crx19007.cro.st.com/api/v1/users/12541/membership
User avatar
Nouha Terzi (terzino)2014-10-03 15:23
My bad, I forget step 2 "On tuleap, in “Admin > Delegation”, create a new group with Retrieve User Membership Information permission and the user you just created."
User avatar
Nouha Terzi (terzino)2014-10-03 15:22
I've this output:
[gitolite@tunlx218 ~]$ /usr/share/tuleap-gitolite-membership/tuleap-gitolite-membership.php --insecure -vvv nouha_terzi
[debug] Reading token from cache.
[debug] Allowing connections to SSL sites without certs
[debug] Retrieving membership information for "nouha_terzi"
[debug] GET /api/v1/users?query=%7B%22username%22%3A%22nouha_terzi%22%7D
[debug] Raw response from the server: [
{
"id": 12541,
"uri": "users/12541",
"email": "nouha.terzi@st.com",
"real_name": "Nouha TERZI",
"username": "nouha_terzi",
"ldap_id": "ed338678",
"avatar_url": "https://crx19007.cro.st.com/users/nouha_terzi/avatar.png"
}
]
[debug] GET /api/v1/users/12541/membership
[debug] Client error response
[status code] 403
[reason phrase] Forbidden
[url] https://crx19007.cro.st.com/api/v1/users/12541/membership
User avatar
Nouha, Denis,

The development of the tuleap/gitolite membership client is completed and you can test it right now.
I attached the rpm as it's not already deployed in dev repository (will be later today).

You need tuleap 7.5.99.21 on the server to make your tests (make use of new routes)

All details for the deployment are available in the documentation: https://tuleap-documentation.readthedocs.org/en/latest/administration-guide/howto.html#deploy-git-mirroring