Archive

Posts Tagged ‘secure’

[ITA] Come implementare in modo facile e veloce un autenticazione OTP su Ubuntu con Secure-Pass

December 5th, 2011 No comments

Come consulente IT sono alla costante ricerca di soluzione che possano aiutare me e i miei clienti ad avere una più efficiente gestione della loro infrastruttura IT. Ultimamente mi sono trovato a discutere con alcuni clienti riguardo le modalità sicure di accesso remoto ai loro dati o sistemi, e spesso si pensa a soluzioni complesse e costose da implementare, mentre,  di recente, sono state introdotte delle soluzioni facili e sicure, che permettono di gestire in maniera veloce e immediata anche soluzioni molto complesse.
Proprio di recente, un cliente mi ha chiesto di implementare un accesso “più sicuro” al loro server SSH / SFTP,  per questo ho testato la soluzione dell’accesso OTP (one time password) di Secure Pass.
Secure Pass è un sistema di gestione delle identità “on the cloud” fornito in modalità SaaS (Software as a Service). L’implementazione è stata veramente facile e veloce, per ciò ho deciso di fare un how-to essenziale che spiegasse come funziona.

I requisiti richiesti sono veramente minimi, ecco quelli usati per il mio test

We have very small pre-requisites for this test/tutorial i used:

  • Una macchina Ubuntu Server, con Server SSH abilitato e funzionante.
  • Se non è già installata, serve la libreria libpam-radius-auth.
    potete facilmente verificare la presenza di pam_radius_auth.so in /lib/security
    altrimenti basta un semplice apt-get install libpam-radius-auth
  • un account Secure Pass  e lo stesso nome utente sulla macchina e sugli utenti Secure Pass.

Siamo Pronti:

Add new device

Come primo passo, accediamo all’interfaccia di amministrazione Secure Pass e aggiungiamo un nuovo device.
Come mostrato nella figura, dobbiamo solo settare l’ IP Pubblico del server, un fully qualified domanin name (FQDN) e la secret pass per l’autenticazione Radius. Dopo l’aggiunta avremo un piccolo riassunto con i dati del device appena aggiunto.

 

 

 

Auth conf

A questo punto, possiamo loggarci sul server e configurare l’autenticazione radius.
Prendete il vostro editor preferito e aprite /etc/pam_radius_auth.conf , e aggiungete alla fine del file le seguenti linee

radius1.secure-pass.net secret 3
radius2.secure-pass.net secret 3

Ovviamente la “secret” è la stessa che abbiamo impostato sul sito Secure Pass; Dopo questo punto dobbiamo configurare la PAM per gestire correttamente l’autenticazione.

 

Per farlo, bisogna editare il file /etc/pam.d/common-auth, e modificare/aggiungere le seguenti linee

auth<-->sufficient<---->pam_radius_auth.so.
auth<-->[success=1 default=ignore]<---->pam_unix.so nullok_secure try_first_pass

OTP app per Android

E’ tutto! siete pronti per loggarvi via SSH al vostro sistema usando la combinazione user + OTP , E’ stato facile, vero?
La password OTP può essere generata da un token fisico ( le classiche “chiavette”), oppure da un apposita App disponibile per iOS e per Android, come nella foto.

[ENG] How to setup an easy OTP access on Ubuntu with Secure-Pass

December 2nd, 2011 No comments

As IT Consultant I’m costantly looking for solutions that can help my customers (and me too!) to have a more proficient , effective IT management. Sometime they think they need complex and expensive solutions to protect and enhance the access to their data, but often the solution is easy and secure. At this time, a customer ask me to implement a “more secure” access to a SSH/SFTP server, so i tested the OTP solution provided by Secure Pass.
Secure Pass is a identity management system on the cloud and provided as a SaaS (Software as a Service). The implementation was extremely fast and easy, so i decided to make this essential how-to to explain how it works.

We have very small pre-requisites for this test/tutorial i used:

  •  Ubuntu Server, with ssh enabled and working
  • If not already installed, you need the libpam-radius-auth library
    (you can easily verify it to check for pam_radius_auth.so presence in /lib/security
    otherwhise simply do an apt-get install libpam-radius-auth)
  • A Secure Pass account and a same-name user account on the server

Ok ready.

At first step, we log in to the SecurePass site to configure a new device.

Add new device

As showed in picture, we only need to set the public IP Address of the server, a fully qualified domain name (FQDN), and the secret password for the radius authentication.After completion we get a small recap of the already created device.
At this point, we can log in to the server to configure the radius authentication.
pick your favourite editor to open /etc/pam_radius_auth.conf and add, at the end of the file the following lines

radius1.secure-pass.net secret 3
radius2.secure-pass.net secret 3

 

auth conf file

Of course the “secret” is the same we have set up on the secure-pass site
beyond this point we need to configure the PAM to correct manage the authentication.

Pick up again an editor and open /etc/pam.d/common-auth

we have to setup two simple lines:

auth<-->sufficient<---->pam_radius_auth.so.
auth<-->[success=1 default=ignore]<---->pam_unix.so nullok_secure try_first_pass

 

That’s all! You are now ready to log in to your system using the combination user + OTP Password! Easy, isn’t ?

OTP app for android

OTP can be provided by a phisical token or, like in this case, by the dedicated Android App
as showed in the photo.