Mercurial > crates > nonstick
comparison pam-http/README.md @ 23:cc32be79a949
Add simple README with example usage of pam-http
author | Rostislav Raykov <z@zbrox.org> |
---|---|
date | Thu, 12 Apr 2018 11:37:41 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
22:4263c1d83d5b | 23:cc32be79a949 |
---|---|
1 pam-http | |
2 ======== | |
3 | |
4 A PAM HTTP BasicAuth module built using pam-rs | |
5 | |
6 # Prerequisites | |
7 | |
8 You need some libraries before you build like libpam and libssl. | |
9 | |
10 If you're going to build on Ubuntu, just run this: | |
11 | |
12 ``` | |
13 sudo apt-get install -y build-essential libpam0g-dev libpam0g libssl-dev | |
14 ``` | |
15 | |
16 # Building | |
17 | |
18 Just use `cargo build`. | |
19 | |
20 # Usage | |
21 | |
22 You need to move the build product to a folder where PAM is looking for modules. | |
23 | |
24 If you're using Ubuntu you can move `libpam_http.so` to `/lib/security`. | |
25 After doing so you need to make sure it has proper permissions: `sudo chmod 755 /lib/security/libpam_http.so`. | |
26 Then you can place a configuration file in `/etc/pam.d/`. It can look something like this: | |
27 | |
28 ``` | |
29 auth sufficient libpam_http.so url=https://theserver.example.com/someendpoint | |
30 account sufficient libpam_http.so | |
31 ``` | |
32 | |
33 Make sure the endpoint you're specifying can receive GET requests and supports | |
34 [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side). | |
35 If the user is authenticated successfully it should return HTTP 200. |