Commit | Line | Data |
---|---|---|
b3543e6c | 1 | ;;; GNU Guix --- Functional package management for GNU |
038c92c4 | 2 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
9e36859c | 3 | ;;; Copyright © 2019, 2020 Ricardo Wurmus <rekado@elephly.net> |
b3543e6c TGR |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages authentication) | |
6bbbdb1a | 21 | #:use-module (gnu packages) |
991c4410 RW |
22 | #:use-module (gnu packages autotools) |
23 | #:use-module (gnu packages documentation) | |
b3543e6c TGR |
24 | #:use-module (gnu packages linux) |
25 | #:use-module (gnu packages pkg-config) | |
991c4410 | 26 | #:use-module (gnu packages security-token) |
b3543e6c TGR |
27 | #:use-module (guix build-system gnu) |
28 | #:use-module (guix download) | |
991c4410 | 29 | #:use-module (guix git-download) |
b3543e6c TGR |
30 | #:use-module ((guix licenses) #:prefix license:) |
31 | #:use-module (guix packages)) | |
32 | ||
33 | (define-public oath-toolkit | |
b3543e6c TGR |
34 | (package |
35 | (name "oath-toolkit") | |
038c92c4 | 36 | (version "2.6.4") |
b3543e6c TGR |
37 | (source |
38 | (origin | |
39 | (method url-fetch) | |
40 | (uri (string-append "https://download.savannah.nongnu.org/releases/" | |
41 | name "/" name "-" version ".tar.gz")) | |
42 | (sha256 | |
038c92c4 | 43 | (base32 "116na9nncpwshl3ww8w3llzwk49igilplxcjy1k6jzl3mmg2bimz")))) |
b3543e6c TGR |
44 | (build-system gnu-build-system) |
45 | (arguments | |
46 | ;; TODO ‘--enable-pskc’ causes xmlsec-related test suite failures. | |
47 | `(#:configure-flags | |
48 | (list "--enable-pam") | |
49 | #:phases | |
50 | (modify-phases %standard-phases | |
51 | (add-after 'install 'delete-static-libraries | |
52 | (lambda* (#:key outputs #:allow-other-keys) | |
53 | (let* ((out (assoc-ref outputs "out")) | |
54 | (lib (string-append out "/lib"))) | |
55 | (for-each delete-file (find-files lib "\\.a$")) | |
56 | #t)))))) | |
57 | (native-inputs | |
58 | `(("pkg-config" ,pkg-config))) | |
59 | (inputs | |
60 | `(("linux-pam" ,linux-pam))) ; for --enable-pam | |
61 | (home-page "https://www.nongnu.org/oath-toolkit/") | |
62 | (synopsis "One-time password (OTP) components") | |
63 | ;; TODO Add the following items after they've been enabled. | |
64 | ;; @item @command{pskctool}, a command-line tool for manipulating secret key | |
65 | ;; files in the Portable Symmetric Key Container (@dfn{PSKC}) format | |
66 | ;; described in RFC6030. | |
67 | ;; @item @code{libpskc}, a shared and static C library for PSKC handling. | |
68 | (description | |
69 | "The @dfn{OATH} (Open AuTHentication) Toolkit provides various components | |
70 | for building one-time password (@dfn{OTP}) authentication systems: | |
71 | ||
72 | @itemize | |
73 | @item @command{oathtool}, a command-line tool for generating & validating OTPs. | |
74 | @item @code{liboath}, a C library for OATH handling. | |
75 | @item @code{pam_oath}, a PAM module for pluggable login authentication. | |
76 | @end itemize | |
77 | ||
78 | Supported technologies include the event-based @dfn{HOTP} algorithm (RFC4226) | |
79 | and the time-based @dfn{TOTP} algorithm (RFC6238).") | |
80 | (license (list license:lgpl2.1+ ; the libraries (liboath/ & libpskc/) | |
81 | license:gpl3+)))) ; the tools (everything else) | |
991c4410 RW |
82 | |
83 | (define-public yubico-pam | |
84 | (let ((commit "b5bd00db81e0e0e0ecced65c684080bb56ddc35b") | |
85 | (revision "0")) | |
86 | (package | |
87 | (name "yubico-pam") | |
88 | (version (git-version "2.26" revision commit)) | |
89 | (source (origin | |
90 | (method git-fetch) | |
91 | (uri (git-reference | |
b0e7b699 | 92 | (url "https://github.com/Yubico/yubico-pam") |
991c4410 RW |
93 | (commit commit))) |
94 | (file-name (git-file-name name version)) | |
95 | (sha256 | |
96 | (base32 | |
97 | "10dq8dqi3jldllj6p8r9hldx9sank9n82c44w8akxrs1vli6nj3m")))) | |
98 | (build-system gnu-build-system) | |
99 | (arguments | |
100 | ;; The pam_test fails because ykclient fails to build a Curl handle. | |
101 | '(#:make-flags '("TESTS=util_test"))) | |
102 | (inputs | |
103 | `(("linux-pam" ,linux-pam) | |
104 | ("libyubikey" ,libyubikey) | |
105 | ("ykclient" ,ykclient) | |
106 | ("yubikey-personalization" ,yubikey-personalization))) | |
107 | (native-inputs | |
108 | `(("autoconf" ,autoconf) | |
109 | ("automake" ,automake) | |
110 | ("libtool" ,libtool) | |
111 | ("asciidoc" ,asciidoc) | |
112 | ("pkg-config" ,pkg-config))) | |
113 | (home-page "https://developers.yubico.com/yubico-pam") | |
114 | (synopsis "Yubico pluggable authentication module") | |
115 | (description "The Yubico PAM module provides an easy way to integrate the | |
116 | YubiKey into your existing user authentication infrastructure.") | |
117 | (license license:bsd-2)))) | |
9e36859c RW |
118 | |
119 | (define-public pamtester | |
120 | (package | |
121 | (name "pamtester") | |
122 | (version "0.1.2") | |
123 | (source | |
124 | (origin | |
125 | (method url-fetch) | |
126 | (uri (string-append | |
127 | "mirror://sourceforge/pamtester/pamtester/" | |
128 | version "/pamtester-" version ".tar.gz")) | |
129 | (sha256 | |
130 | (base32 "1mdj1wj0adcnx354fs17928yn2xfr1hj5mfraq282dagi873sqw3")))) | |
131 | (build-system gnu-build-system) | |
132 | (native-inputs | |
133 | `(("pkg-config" ,pkg-config))) | |
134 | (inputs | |
135 | `(("linux-pam" ,linux-pam))) | |
136 | (home-page "http://pamtester.sourceforge.net/") | |
137 | (synopsis "Utility for testing pluggable authentication modules (PAM) facility") | |
138 | (description | |
139 | "Pamtester is a tiny utility program to test the pluggable authentication | |
140 | modules (PAM) facility, specifically designed to help PAM module authors to | |
141 | intensively test their own modules.") | |
142 | (license license:bsd-3))) |