|
|
|
@ -26,20 +26,16 @@
|
|
|
|
|
(if val "True" "False"))))
|
|
|
|
|
|
|
|
|
|
(define-configuration sssd-domain-configuration
|
|
|
|
|
(id_provider maybe-string "id provider")
|
|
|
|
|
(auth_provider maybe-string "auth provider")
|
|
|
|
|
(cache_credentials maybe-boolean "cache credentials")
|
|
|
|
|
(ldap_uri maybe-string "ldap server uri")
|
|
|
|
|
(ldap_tls_reqcert maybe-string "tls_reqcert")
|
|
|
|
|
(ldap_tls_cacertdir maybe-string
|
|
|
|
|
"ca certificate directory")
|
|
|
|
|
(ldap_search_base maybe-string "base dn for search")
|
|
|
|
|
(ldap_default_bind_dn maybe-string
|
|
|
|
|
"dn to bind for search")
|
|
|
|
|
(ldap_default_authtok_type maybe-string
|
|
|
|
|
"ldap auth token type")
|
|
|
|
|
(ldap_default_authtok maybe-string
|
|
|
|
|
"token to use for ldap bind"))
|
|
|
|
|
(id_provider maybe-string "id provider")
|
|
|
|
|
(auth_provider maybe-string "auth provider")
|
|
|
|
|
(cache_credentials maybe-boolean "cache credentials")
|
|
|
|
|
(ldap_uri maybe-string "ldap server uri")
|
|
|
|
|
(ldap_tls_reqcert maybe-string "tls_reqcert")
|
|
|
|
|
(ldap_tls_cacertdir maybe-string "ca certificate directory")
|
|
|
|
|
(ldap_search_base maybe-string "base dn for search")
|
|
|
|
|
(ldap_default_bind_dn maybe-string "dn to bind for search")
|
|
|
|
|
(ldap_default_authtok_type maybe-string "ldap auth token type")
|
|
|
|
|
(ldap_default_authtok maybe-string "token to use for ldap bind"))
|
|
|
|
|
|
|
|
|
|
(define (sssd-domain-configuration-with-name? val)
|
|
|
|
|
(if (pair? val)
|
|
|
|
@ -69,36 +65,39 @@
|
|
|
|
|
(string-join value ", "))))
|
|
|
|
|
|
|
|
|
|
(define-configuration sssd-configuration
|
|
|
|
|
(sssd (file-like sssd) "sssd package to use")
|
|
|
|
|
(pam-services (list-of-strings (list "su" "gdm-password"
|
|
|
|
|
"login" "sshd"
|
|
|
|
|
"passwd"))
|
|
|
|
|
"list of pam services to configure login for"
|
|
|
|
|
(lambda (a b)
|
|
|
|
|
""))
|
|
|
|
|
(services (list-of-strings (list "nss" "sudo" "pam"
|
|
|
|
|
"ssh" "ifp"))
|
|
|
|
|
"list of services")
|
|
|
|
|
(domains (list-of-sssd-domain-configurations '())
|
|
|
|
|
"sssd domains to configure"))
|
|
|
|
|
(sssd (file-like sssd) "sssd package to use")
|
|
|
|
|
(pam-services (list-of-strings (list "su" "gdm-password" "login" "sshd"
|
|
|
|
|
"passwd"))
|
|
|
|
|
"list of pam services to configure login for"
|
|
|
|
|
(lambda (a b)
|
|
|
|
|
""))
|
|
|
|
|
(services (list-of-strings (list "nss" "sudo" "pam" "ssh" "ifp"))
|
|
|
|
|
"list of services")
|
|
|
|
|
(domains (list-of-sssd-domain-configurations '())
|
|
|
|
|
"sssd domains to configure"))
|
|
|
|
|
|
|
|
|
|
(define (sssd-pam-service config)
|
|
|
|
|
(define sssd-pam-module
|
|
|
|
|
(file-append (sssd-configuration-sssd config) "/lib/security/pam_sss.so"))
|
|
|
|
|
(lambda (pam)
|
|
|
|
|
(if (member (pam-service-name pam)
|
|
|
|
|
(sssd-configuration-pam-services config))
|
|
|
|
|
(let ((sufficient (pam-entry (control "sufficient")
|
|
|
|
|
(module sssd-pam-module))))
|
|
|
|
|
(pam-service (inherit pam)
|
|
|
|
|
(auth (cons sufficient
|
|
|
|
|
(pam-service-auth pam)))
|
|
|
|
|
(account (cons sufficient
|
|
|
|
|
(pam-service-account pam)))
|
|
|
|
|
(password (cons sufficient
|
|
|
|
|
(pam-service-password pam)))
|
|
|
|
|
(session (cons sufficient
|
|
|
|
|
(pam-service-session pam))))) pam)))
|
|
|
|
|
(let ((sufficient (pam-entry (control "sufficient")
|
|
|
|
|
(module (file-append (sssd-configuration-sssd
|
|
|
|
|
config)
|
|
|
|
|
"/lib/security/pam_sss.so")))))
|
|
|
|
|
(pam-extension (transformer (lambda (pam)
|
|
|
|
|
(if (member (pam-service-name pam)
|
|
|
|
|
(sssd-configuration-pam-services
|
|
|
|
|
config))
|
|
|
|
|
(pam-service (inherit pam)
|
|
|
|
|
(auth (cons sufficient
|
|
|
|
|
(pam-service-auth
|
|
|
|
|
pam)))
|
|
|
|
|
(account (cons sufficient
|
|
|
|
|
(pam-service-account
|
|
|
|
|
pam)))
|
|
|
|
|
(password (cons sufficient
|
|
|
|
|
(pam-service-password
|
|
|
|
|
pam)))
|
|
|
|
|
(session (cons sufficient
|
|
|
|
|
(pam-service-session
|
|
|
|
|
pam)))) pam))))))
|
|
|
|
|
|
|
|
|
|
(define (sssd-pam-services config)
|
|
|
|
|
(list (sssd-pam-service config)))
|
|
|
|
|