| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages authentication)
|
| 22 | #:use-module (gnu packages)
|
| 23 | #:use-module (gnu packages autotools)
|
| 24 | #:use-module (gnu packages documentation)
|
| 25 | #:use-module (gnu packages gnupg)
|
| 26 | #:use-module (gnu packages golang)
|
| 27 | #:use-module (gnu packages golang-build)
|
| 28 | #:use-module (gnu packages golang-web)
|
| 29 | #:use-module (gnu packages golang-xyz)
|
| 30 | #:use-module (gnu packages linux)
|
| 31 | #:use-module (gnu packages pkg-config)
|
| 32 | #:use-module (gnu packages security-token)
|
| 33 | #:use-module (gnu packages tls)
|
| 34 | #:use-module (gnu packages xml)
|
| 35 | #:use-module (guix build-system cmake)
|
| 36 | #:use-module (guix build-system gnu)
|
| 37 | #:use-module (guix build-system go)
|
| 38 | #:use-module (guix download)
|
| 39 | #:use-module (guix gexp)
|
| 40 | #:use-module (guix git-download)
|
| 41 | #:use-module ((guix licenses) #:prefix license:)
|
| 42 | #:use-module (guix packages))
|
| 43 |
|
| 44 | (define-public libcotp
|
| 45 | (package
|
| 46 | (name "libcotp")
|
| 47 | (version "4.0.0")
|
| 48 | (source
|
| 49 | (origin
|
| 50 | (method git-fetch)
|
| 51 | (uri (git-reference
|
| 52 | (url "https://github.com/paolostivanin/libcotp")
|
| 53 | (commit (string-append "v" version))))
|
| 54 | (file-name (git-file-name name version))
|
| 55 | (sha256
|
| 56 | (base32 "0p5z04klbb3p9ljkz6qmdb4fk9sx79yv7zcac005c0zk875pz1py"))))
|
| 57 | (build-system cmake-build-system)
|
| 58 | (arguments `(#:tests? #f))
|
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | (inputs (list libgcrypt))
|
| 65 | (native-inputs (list pkg-config))
|
| 66 | (home-page "https://github.com/paolostivanin/libcotp")
|
| 67 | (synopsis "One-Time Passwords")
|
| 68 | (description "This package provides a library to generate
|
| 69 | @acronym{HOTP, HMAC-base One-Time Password}s as specified in RFC 4226 and
|
| 70 | @acronym{TOTP, Time-based One-Time Password}s as specified in RFC 6238.")
|
| 71 | (license license:asl2.0)))
|
| 72 |
|
| 73 | (define-public oath-toolkit
|
| 74 | (package
|
| 75 | (name "oath-toolkit")
|
| 76 | (version "2.6.11")
|
| 77 | (source
|
| 78 | (origin
|
| 79 | (method url-fetch)
|
| 80 | (uri (string-append "https://download.savannah.nongnu.org/releases/"
|
| 81 | name "/" name "-" version ".tar.gz"))
|
| 82 | (sha256
|
| 83 | (base32 "1d1c3r1jhd72l5ppsfa9wvvm8kffzs4k2v2qn0xc9x26bd52llgw"))))
|
| 84 | (build-system gnu-build-system)
|
| 85 | (arguments
|
| 86 | |
| 87 | `(#:configure-flags
|
| 88 | (list "--enable-pam"
|
| 89 | "--enable-pskc"
|
| 90 | "--with-xmlsec-crypto-engine=openssl")
|
| 91 | #:phases
|
| 92 | (modify-phases %standard-phases
|
| 93 | (add-after 'install 'delete-static-libraries
|
| 94 | (lambda* (#:key outputs #:allow-other-keys)
|
| 95 | (let* ((out (assoc-ref outputs "out"))
|
| 96 | (lib (string-append out "/lib")))
|
| 97 | (for-each delete-file (find-files lib "\\.a$"))))))))
|
| 98 | (native-inputs
|
| 99 | (list pkg-config
|
| 100 | |
| 101 | libltdl))
|
| 102 | (inputs
|
| 103 | (list linux-pam openssl xmlsec-openssl))
|
| 104 | (home-page "https://www.nongnu.org/oath-toolkit/")
|
| 105 | (synopsis "@acronym{OTP, one-time password} components")
|
| 106 | (description
|
| 107 | "The @acronym{OATH, Open AuTHentication} Toolkit provides various
|
| 108 | components for building @acronym{OTP, One-Time Password} authentication systems:
|
| 109 |
|
| 110 | @itemize
|
| 111 | @item @command{oathtool}, a command-line tool for generating & validating OTPs.
|
| 112 | @item @code{liboath}, a C library for OATH handling.
|
| 113 | @item @command{pskctool}, a command-line tool for manipulating secret key
|
| 114 | files in the @acronym{PSKC, Portable Symmetric Key Container} format
|
| 115 | described in RFC6030.
|
| 116 | @item @code{libpskc}, a shared and static C library for PSKC handling.
|
| 117 | @item @code{pam_oath}, a PAM module for pluggable login authentication.
|
| 118 | @end itemize
|
| 119 |
|
| 120 | Supported technologies include the event-based @acronym{HOTP, Hash-based Message
|
| 121 | Authentication Code One-Time Password} algorithm (RFC4226), the time-based
|
| 122 | @acronym{TOTP, Time-based One-Time Password} algorithm (RFC6238), and
|
| 123 | PSKC (RFC6030) to manage secret key data.")
|
| 124 | (license (list license:lgpl2.1+ |
| 125 | license:gpl3+)))) |
| 126 |
|
| 127 | (define-public oauth2l
|
| 128 | (package
|
| 129 | (name "oauth2l")
|
| 130 | (version "1.3.3")
|
| 131 | (source
|
| 132 | (origin
|
| 133 | (method git-fetch)
|
| 134 | (uri (git-reference
|
| 135 | (url "https://github.com/google/oauth2l")
|
| 136 | (commit (string-append "v" version))))
|
| 137 | (file-name (git-file-name name version))
|
| 138 | (sha256
|
| 139 | (base32 "0qpgbbyjvvdw944d7ppa9ccmcp0gyyc9ik0bhq8agsia40biagwc"))
|
| 140 | (snippet
|
| 141 | #~(begin (use-modules (guix build utils))
|
| 142 | (delete-file-recursively "vendor")))))
|
| 143 | (build-system go-build-system)
|
| 144 | (arguments
|
| 145 | (list
|
| 146 | #:install-source? #f
|
| 147 | #:import-path "github.com/google/oauth2l"
|
| 148 | #:test-flags
|
| 149 | #~(list "-skip"
|
| 150 | |
| 151 | (string-join
|
| 152 | (list "Test2LOFlow/curl._2lo"
|
| 153 | "Test3LOFlow/curl._3lo"
|
| 154 | "Test3LOFlow/fetch._3lo_cached"
|
| 155 | "Test3LOFlow/fetch._3lo_insert_expired_token_into_cache"
|
| 156 | "Test3LOLoopbackFlow/curl._3lo_loopback"
|
| 157 | "Test3LOLoopbackFlow/fetch._3lo_loopback_cached"
|
| 158 | "Test3LOLoopbackFlow/fetch._3lo_loopback_insert_expired_token_into_cache"
|
| 159 | "TestCLI/info._invalid_token"
|
| 160 | "TestSSOFlow/fetch._sso"
|
| 161 | "TestSSOFlow/fetch._sso._old_interface"
|
| 162 | "TestServiceAccountImpersonationFlow/fetch._sso.*"
|
| 163 | "TestStsFlow/fetch._2lo._sts"
|
| 164 | "TestStsFlow/fetch._sso._sts")
|
| 165 | "|")
|
| 166 | |
| 167 | "-vet=off")
|
| 168 | #:phases
|
| 169 | #~(modify-phases %standard-phases
|
| 170 | (add-before 'check 'pre-check
|
| 171 | (lambda _
|
| 172 | (setenv "HOME" "/tmp"))))))
|
| 173 | (native-inputs
|
| 174 | (list go-github-com-google-uuid
|
| 175 | go-github-com-jessevdk-go-flags
|
| 176 | go-golang-org-x-oauth2))
|
| 177 | (home-page "https://github.com/google/oauth2l")
|
| 178 | (synopsis "Simple CLI for interacting with Google API authentication")
|
| 179 | (description
|
| 180 | "@code{oauth2l} (pronounced ``oauth tool'') is a simple command-line tool
|
| 181 | for working with @url{https://developers.google.com/identity/protocols/OAuth2,
|
| 182 | Google OAuth 2.0} written in Go. Its primary use is to fetch and print OAuth
|
| 183 | 2.0 access tokens, which can be used with other command-line tools and
|
| 184 | scripts.")
|
| 185 | (license license:asl2.0)))
|
| 186 |
|
| 187 | (define-public yubico-pam
|
| 188 | (package
|
| 189 | (name "yubico-pam")
|
| 190 | (version "2.27")
|
| 191 | (source (origin
|
| 192 | (method git-fetch)
|
| 193 | (uri (git-reference
|
| 194 | (url "https://github.com/Yubico/yubico-pam")
|
| 195 | (commit version)))
|
| 196 | (file-name (git-file-name name version))
|
| 197 | (sha256
|
| 198 | (base32
|
| 199 | "0hb773zlf11xz4bwmsqv2mq5d4aq2g0crdr5cp9xwc4ivi5gd4kg"))))
|
| 200 | (build-system gnu-build-system)
|
| 201 | (arguments
|
| 202 | |
| 203 | '(#:make-flags '("TESTS=util_test")))
|
| 204 | (inputs
|
| 205 | (list linux-pam libyubikey ykclient yubikey-personalization))
|
| 206 | (native-inputs
|
| 207 | (list autoconf automake libtool asciidoc pkg-config))
|
| 208 | (home-page "https://developers.yubico.com/yubico-pam")
|
| 209 | (synopsis "Yubico pluggable authentication module")
|
| 210 | (description "The Yubico PAM module provides an easy way to integrate the
|
| 211 | YubiKey into your existing user authentication infrastructure.")
|
| 212 | (license license:bsd-2)))
|
| 213 |
|
| 214 | (define-public pamtester
|
| 215 | (package
|
| 216 | (name "pamtester")
|
| 217 | (version "0.1.2")
|
| 218 | (source
|
| 219 | (origin
|
| 220 | (method url-fetch)
|
| 221 | (uri (string-append
|
| 222 | "mirror://sourceforge/pamtester/pamtester/"
|
| 223 | version "/pamtester-" version ".tar.gz"))
|
| 224 | (sha256
|
| 225 | (base32 "1mdj1wj0adcnx354fs17928yn2xfr1hj5mfraq282dagi873sqw3"))))
|
| 226 | (build-system gnu-build-system)
|
| 227 | (arguments
|
| 228 | `(#:phases
|
| 229 | (modify-phases %standard-phases
|
| 230 | (add-after 'unpack 'force-reconfigure
|
| 231 | (lambda _ (delete-file "configure"))))))
|
| 232 | (native-inputs
|
| 233 | (list autoconf automake libtool pkg-config))
|
| 234 | (inputs
|
| 235 | (list linux-pam))
|
| 236 | (home-page "https://pamtester.sourceforge.net/")
|
| 237 | (synopsis "Utility for testing pluggable authentication modules (PAM) facility")
|
| 238 | (description
|
| 239 | "Pamtester is a tiny utility program to test the pluggable authentication
|
| 240 | modules (PAM) facility, specifically designed to help PAM module authors to
|
| 241 | intensively test their own modules.")
|
| 242 | (license license:bsd-3)))
|