--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: tracker.debian.org: Replace LDAP access to get DD names with nm.debian.org REST API
- From: Raphaël Hertzog <hertzog@debian.org>
- Date: Fri, 28 Aug 2015 20:12:12 +0200
- Message-id: <20150828181212.25967.78784.reportbug@x230-buxy.home.ouaza.com>
Package: tracker.debian.org
Severity: wishlist
Tags: newcomer
distro_tracker/vendor/debian/sso_auth.py uses the ldap Python module
in DebianSsoUserBackend.get_user_details() to retrieve the first name
and last name of Debian developers.
I would like to stop relying on LDAP (as the ldap module is not Python 3
compatible, and one less dependency is always good) and instead we should
use the nm.debian.org REST API: https://nm.debian.org/api
$ curl https://nm.debian.org/api/people?uid=hertzog
{
"r": [
{
"status": "dd_u",
"uid": "hertzog",
"created": "0",
"url": "/public/person/hertzog",
"mn": "",
"sn": "Hertzog",
"fpr": "3E4FB7117877F589DBCF06D6E619045DF2AC729A",
"status_changed": "0",
"fullname": "Rapha\u00ebl Hertzog",
"cn": "Rapha\u00ebl"
}
]
}
This way we can use the "requests" Python module that we already have as
dependency to retrieve the data we need.
Cheers,
Raphaël.
--- End Message ---
--- Begin Message ---
- To: Ville Skyttä <ville.skytta@iki.fi>, 797223-done@bugs.debian.org
- Subject: Re: Bug#797223:
- From: Raphael Hertzog <hertzog@debian.org>
- Date: Wed, 1 Nov 2017 12:09:21 +0100
- Message-id: <20171101110921.ucymtmaxaghh5cmx@home.ouaza.com>
- In-reply-to: <CABr9L5AtpVKBU86r34fo7wrXBpCc_wg1t+VYgipY+Z3y1J5iqA@mail.gmail.com>
- References: <20150828181212.25967.78784.reportbug@x230-buxy.home.ouaza.com> <CABr9L5AtpVKBU86r34fo7wrXBpCc_wg1t+VYgipY+Z3y1J5iqA@mail.gmail.com>
On Tue, 31 Oct 2017, Ville Skyttä wrote:
> Implementation attached, tox tested only.
I made a quick test on the command line and it seems to work. Thanks for
the patch! I applied it on the git repository.
Don't hesitate to add missing unit tests. Here for instance you could have
added a patch testing get_user_details() while mocking out
get_resource_content().
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
--- End Message ---