[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#797223: marked as done (tracker.debian.org: Replace LDAP access to get DD names with nm.debian.org REST API)



Your message dated Wed, 1 Nov 2017 12:09:21 +0100
with message-id <20171101110921.ucymtmaxaghh5cmx@home.ouaza.com>
and subject line Re: Bug#797223:
has caused the Debian Bug report #797223,
regarding tracker.debian.org: Replace LDAP access to get DD names with nm.debian.org REST API
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
797223: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797223
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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 ---
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 ---

Reply to: