Workshop de Escalabilidad en Auth0

El sábado pasado estuve facilitando un taller de escalabilidad organizado conjuntamente por la gente de FreeCodeCampBA y Auth0. El taller se realizó en la oficinas de Auth0 y duró poco más de 3 horas. Vimos un poco de teoría y mucha práctica usando AWS y Nginx. La evaluación general de los participantes fue de 9.2/10 lo que me deja muy contento 🙂

Los slides están disponibles aquí.

¿Queres aprender sobre escalabilidad de Software?

La gente Auth0 ha comenzado una iniciativa que ha dado en llamar Engineering BootCamp de la cual estoy siendo parte. En términos concretos esta iniciativa consiste en una serie de entrenamientos de entre 20 y 30 horas con un enfoque «hands-on» (algo así como 20% de teoría y 80% de práctica).

El primer entrenamiento será sobre escalabilidad y se llevará a cabo a comienzos de Febrero en las oficinas de Auth0 en Buenos Aires. La participación es totalmente gratuita pero como los cupos son limitados, los interesados deben completar un formulario de postulación y a continuación resolver un pequeño ejercicio de programación. La idea es que este ejercicio nos ayude a asegurar cierto nivel mínimo de conocimiento en los participantes.

Los interesados pueden encontrar más información y completar su postulación aquí. No se dejen estar que la postulación termina hoy (viernes 12).

 

Configuring Jenkins Authentication with Auth0

The procedure described here is based on Jenkins 2.7.4 but I think it should also work with other (not so distant) versions.

First of all, log into your Auth0 account.

Then create a new client applicationClients» item in left-hand menu).

auth0_1

In  the «Create Client» dialog set the name of your client application (for example «MyJenkins«) and choose the application type «Regular Web Applications«, finally click «Create«.

auth0_2

Once the application is created, go to «Settings» and set the value of the «Allowed Callback URLs» to «http://YOUR_JENKINS_URL/securityRealm/finishLogin«. Click «Save Changes«.

auth0_4

Scroll down to the «Advanced Settings» section, click on «Endpoints«. Take the SAML Metadata URL and save the content in that URL into a file (remember this file because we will use it later when configuring Jenkins).

auth0_9

Go to the «Addons» tab and enable «SAML2» option.

auth0_5

In the Addon configuration dialog edit the settings to set the «audience» and «recipient» values to «http://%5BYOUR_JENKINS_URL%5D/securityRealm/finishLogin«.

auth0_6

Click «Save» and close de dialog. Now you should see the SAML2 option is enabled.

auth0_7

 

That’s all on Auth0 size, now let’s work on Jenkins.

To perform the following steps, you need to be logged in with a user with administrator profile. I assume the reader is already familiar with Jenkins so the instructions won’t be so detailed.

First of all we need to install the «SAML Plugin«.

auth0_8

Once the installation is ready go to «Manage Jenkins > Configure Global Security«. In the «Security Realm» pick «SAML 2.0» and in the «IdP Metadata» box paste the content of metadata file you saved on before.

Scroll down to the «Authorization» section and ensure the option «Logged-in users can do anything» is selected (authorization  is something we will work on later). Scroll down to the bottom of the page and click «Save«.

That’s all.  Close the browser [*] and the next time you try to log in you will be redirected to Auth0. Now every user enabled in your Auth0 account will be able to log into Jenkins.

In the next article I will explain how to configure authorization.

[*] at the moment of this writing there is bug in the SAML plugin that affect a logout feature https://issues.jenkins-ci.org/browse/JENKINS-37311.