Olá, quero compartilhar minha experiência com LinOTP e dar um exemplo de autenticação forte usando LinOTP + FreeRADIUS e Wallix Bastion.
LinOTP é uma plataforma de código aberto flexível de nível empresarial para autenticação forte.
Wallix Bastion é uma solução de gerenciamento de acesso privilegiado (PAM).
Habré já tem alguns artigos sobre LinOTP - 1 , 2 . Aqui usamos novas versões de sistema operacional e produtos, e também passamos pela configuração do início ao fim, vamos lá ..
O que usamos:
LinOTP 2.12.3
Debian 10 ( também compatível )
FreeRADIUS 3
Wallix bastião 8
Adicione o repositório linotp.org:
1. Instalação do LinOTP
Adicione o repositório linotp.org:
echo 'deb http://www.linotp.org/apt/debian buster linotp linotp-deps' > /etc/apt/sources.list.d/linotp.list
Para verificar o pacote, importe a chave de assinatura do pacote:
apt-get install dirmngr
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 913DFF12F86258E5
Instale o banco de dados ( bancos de dados compatíveis ):
apt-get update
apt-get install mariadb-server
mysql_secure_installation
Finalmente, instale o LinOTP:
apt-get install linotp
2. Integração com Active Directory
Você pode entrar em contato com o administrador da web do LinOTP seguindo o link: https: // <linotp_ip> / manage
Vá para LinotpConfig -> UserIdResolvers e crie um novo UserIdResolver, escolhendo o tipo de LDAP :
Agora você tem que adicionar um Realm - dê a ele um nome e especifique o Resolvedor LDAP que você acabou de criar.
UserIdResolver- «», LinOTP. Realm-e UserIdResolver- (multitenancy, ).
User View.
3. LinOTP FreeRADIUS
FreeRADIUS :
apt-get install linotp-adminclient-cli python-ldap freeradius python-passlib python-bcrypt git libio-all-lwp-perl libconfig-file-perl libtry-tiny-perl
freeradius:
ln -s /etc/freeradius/3.0/sites-available /etc/freeradius/sites-available
ln -s /etc/freeradius/3.0/sites-enabled /etc/freeradius/sites-enabled
ln -s /etc/freeradius/3.0/clients.conf /etc/freeradius/clients.conf
ln -s /etc/freeradius/3.0/users /etc/freeradius/users
linotp-auth-freeradius-perl:
git clone https://github.com/LinOTP/linotp-auth-freeradius-perl.git
cd linotp-auth-freeradius-perl/
cp radius_linotp.pm /usr/share/linotp/radius_linotp.pm
:
nano /etc/freeradius/sites-enabled/linotp
server linotp {
listen {
ipaddr = *
port = 1812
type = auth
}
listen {
ipaddr = *
port = 1813
type = acct
}
authorize {
preprocess
update {
&control:Auth-Type := Perl
}
}
authenticate {
Auth-Type Perl {
perl
}
}
accounting {
unix
}
}
sites-enabled linotp:
ls /etc/freeradius/sites-enabled
linotp
RADIUS-. Wallix Bastion:
nano /etc/freeradius/clients.conf
client Wallix { ipaddr = 192.168.10.10 secret = your_secret }
perl :
nano /etc/freeradius/users
DEFAULT Auth-type := perl
nano /etc/freeradius/3.0/mods-available/perl
perl { filename = /usr/share/linotp/radius_linotp.pm func_authenticate = authenticate func_authorize = authorize }
mods-enabled eap:
ln -s /etc/freeradius/3.0/mods-available/perl /etc/freeradius/3.0/mods-enabled/perl
rm /etc/freeradius/3.0/mods-enabled/eap
, Radius:
nano /etc/linotp2/rlm_perl.ini
URL=https://<Linotp_ip>/validate/simplecheck REALM=realm1 RESCONF=resolver1 Debug=True SSL_CHECK=False
4.
. LinOTP selfservice , .
LinOTPConfig > policies . TOTP, Google Authenticator, :
URL : https://<LINOTP_ip> https://<LINOTP_ip> /selfservice/login
5. Wallix Bastion
Wallix Bastion , -, .
Configuration> External authentication - RADIUS. Secret , freeRADIUS.
LDAP/AD domains ( , ) , LinOTP. Secondary authentication linotp . :
Wallix Bastion , LinOTP.
6. Troubleshoot.
Se algo não funcionar, você pode procurar erros:
Registros RADIUS:
/var/log/freeradius/radius.log
Logs do LinOTP:
/var/log/linotp/linotp.log
Você pode verificar o token da seguinte maneira:
https://<yourlinotpserver>/validate/check?user=<login>&pass=<OTPvalue>
Em vez de saída
Neste artigo, configuramos uma plataforma local para o segundo fator de autenticação - LinOTP e a aparafusamos na solução Wallix Bastion com FreeRADIUS como conector.
Meu artigo está em inglês. - médio
Obrigado pelo seu tempo, espero que as informações tenham sido úteis.