This is a NSS module that uses cURL to fetch JSON from the remote host via http(s) and use that JSON to provide account information to a Linux system.
- libssl-dev
- jansson-dev
- libcurl4-gnutls-dev
I tested the installation on Ubuntu 18.04, you will need to change Makefile maybe.
- Clone git repo
- Install dependencies
- make
- make install
- Edit /etc/nsswitch.conf, add "curl" to the desired sections
passwd: compat curl
group: compat
The module is configured via /etc/nss_curl.conf that is a JSON data file.
{
"passwd": "https://example.com/users.json",
"groups": "https://example.com/groups.json",
"headers":[
{"Authorization": "Basic dGVzdDp0ZXN0"}
],
"cache_directory": "/tmp",
"cache_valid": 300
}
I think, keys' names are self-documented.
Groups support- HTTP headers support
Copyright (c) 2019 Roman Yerin <r.yerin@640kb.co.uk>
Licensed under the GPLv3 license.