mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
Google Authenticator 2FA support over XRDP (#407736)
This commit is contained in:
commit
a3e8ba327e
1 changed files with 19 additions and 0 deletions
|
@ -249,6 +249,23 @@ let
|
||||||
to provide Google Authenticator token to log in.
|
to provide Google Authenticator token to log in.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
allowNullOTP = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to allow login for accounts that have no OTP set
|
||||||
|
(i.e., accounts with no OTP configured or no existing
|
||||||
|
{file}`~/.google_authenticator`).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
forwardPass = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
The authentication provides a single field requiring
|
||||||
|
the user's password followed by the one-time password (OTP).
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
otpwAuth = lib.mkOption {
|
otpwAuth = lib.mkOption {
|
||||||
|
@ -1048,6 +1065,8 @@ let
|
||||||
modulePath = "${pkgs.google-authenticator}/lib/security/pam_google_authenticator.so";
|
modulePath = "${pkgs.google-authenticator}/lib/security/pam_google_authenticator.so";
|
||||||
settings = {
|
settings = {
|
||||||
no_increment_hotp = true;
|
no_increment_hotp = true;
|
||||||
|
forward_pass = cfg.googleAuthenticator.forwardPass;
|
||||||
|
nullok = cfg.googleAuthenticator.allowNullOTP;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue