LinOTP - Installation und Verwendung

Hallo, ich möchte meine Erfahrungen mit LinOTP teilen und ein Beispiel für eine starke Authentifizierung mit LinOTP + FreeRADIUS und Wallix Bastion geben.





LinOTP ist eine flexible Open Source- Plattform für Unternehmen zur starken Authentifizierung.





Wallix Bastion ist eine PAM-Lösung (Privileged Access Management).





Habré hat bereits einige Artikel über LinOTP - 1 , 2 . Hier verwenden wir neue Versionen von Betriebssystemen und Produkten und gehen das Setup von Anfang bis Ende durch.





Was wir verwenden:





  • LinOTP 2.12.3





  • Debian 10 ( auch unterstützt )





  • FreeRADIUS 3





  • Wallix Bastion 8





  1. Fügen Sie das linotp.org-Repository hinzu:





1. Installation von LinOTP

Fügen Sie das linotp.org-Repository hinzu:





echo 'deb http://www.linotp.org/apt/debian buster linotp linotp-deps' > /etc/apt/sources.list.d/linotp.list







Importieren Sie den Paketsignaturschlüssel, um das Paket zu überprüfen:





apt-get install dirmngr







apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 913DFF12F86258E5







Installieren Sie die Datenbank ( unterstützte Datenbanken ):





apt-get update







apt-get install mariadb-server







mysql_secure_installation







Installieren Sie abschließend LinOTP:





apt-get install linotp







2. Integration mit Active Directory

Sie erreichen den LinOTP-Webadministrator über den folgenden Link: https: // <linotp_ip> / manage





Gehen Sie zu LinotpConfig -> UserIdResolvers und erstellen Sie einen neuen UserIdResolver, indem Sie den LDAP- Typ auswählen :





Resolver-eine Konfiguration
Resolver-eine Konfiguration

Jetzt müssen Sie ein Realm hinzufügen - geben Sie ihm einen Namen und geben Sie den soeben erstellten LDAP-Resolver an.





UserIdResolver- «», LinOTP. Realm-e UserIdResolver- (multitenancy, ).





User View.





Synchronisierte Benutzer
C

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, :





Richtlinieneinstellung

- .





URL : https://<LINOTP_ip> https://<LINOTP_ip> /selfservice/login





5. Wallix Bastion

Wallix Bastion , -, .





Configuration> External authentication - RADIUS. Secret , freeRADIUS.





Externe Authentifizierung auf Wallix Bastion
Wallix Bastion

LDAP/AD domains ( , ) , LinOTP. Secondary authentication linotp . :





Wallix Bastion , LinOTP.





6. Troubleshoot.





Wenn etwas nicht funktioniert, können Sie nach Fehlern suchen:





RADIUS-Protokolle:





/var/log/freeradius/radius.log







LinOTP-Protokolle:





/var/log/linotp/linotp.log







Sie können den Token wie folgt überprüfen:





https://<yourlinotpserver>/validate/check?user=<login>&pass=<OTPvalue>








Anstelle von Ausgabe

In diesem Artikel haben wir eine lokale Plattform für den zweiten Authentifizierungsfaktor - LinOTP - konfiguriert und diese mit FreeRADIUS als Konnektor in die Wallix Bastion-Lösung eingeschraubt.





Mein Artikel ist in Englisch. - mittel





Vielen Dank für Ihre Zeit, ich hoffe die Informationen waren hilfreich.








All Articles