Tareas # 2453 (En curso): Probar Shibboleth Instalar Shibboleth · instalamos tomcat6-admin. Para...
Transcript of Tareas # 2453 (En curso): Probar Shibboleth Instalar Shibboleth · instalamos tomcat6-admin. Para...
Aprovisionamiento de Identidad - Tareas #2461
Tareas # 2453 (En curso): Probar Shibboleth
Instalar Shibboleth
01/26/2014 01:26 PM - Daniel Viñar Ulriksen
Status: Cerrada Start date: 01/26/2014
Priority: Normal Due date:
Assignee: Cielito - LDAP % Done: 80%
Category: Estimated time: 30.00 hours
Target version: Spent time: 21.00 hours
Description
Vamos mirando la doc y explorando.
Abrá que poner más tareas de configuración, pruebas, etc.
Related issues:
Related to Seguridad de la información - Tareas # 2462: ¿Cómo abrir un tunel ... Nueva 01/26/2014
Related to Aprovisionamiento de Identidad - Tareas # 3971: Instalación desde ... Resuelta 01/23/2015
History
#1 - 01/26/2014 01:26 PM - Daniel Viñar Ulriksen
- Assignee set to Daniel Viñar Ulriksen
#2 - 01/26/2014 01:53 PM - Daniel Viñar Ulriksen
Por ahora no entiendo nada de: https://wiki.shibboleth.net/confluence/display/SHIB2/IdPInstall#IdPInstall-BeforeYouBegin
en particular el asunto del MetaData.
Veamos los requisistos de contenedor: ver: https://wiki.shibboleth.net/confluence/display/SHIB2/IdPApacheTomcatPrepare
con aptitude, buscamos lo que tiene que ver con tomcat
Instalo tomcat6 y dependencias.
#3 - 01/26/2014 01:53 PM - Daniel Viñar Ulriksen
- Status changed from Nueva to En curso
#4 - 01/26/2014 02:11 PM - Daniel Viñar Ulriksen
funciona: http://curie.csic.edu.uy:8080/
Doc archi básica del paquete:
root@curie:~# gunzip -c /usr/share/doc/tomcat6/README.Debian.gz | less
Como aconseja:
* If you install tomcat6-admin, then you need to edit
/etc/tomcat6/tomcat-users.xml and add to it the following:
<role rolename="manager"/>
<user username="tomcat" password="*******" roles="manager"/>
Tomcat administration will be accessible on
http://localhost:8080/manager/html
02/26/2020 1/8
instalamos tomcat6-admin.
Para accederlo de afuera, abrimos el redireccionamiento de puertos por túneles. Reflexión de seguridad: #2462.
#5 - 01/26/2014 02:56 PM - Daniel Viñar Ulriksen
Luego de haber perdido un rato de no ver los <!--- ---> que encuadraban lo que estaba configurando en el .xml...
Arranco la webapp de administración, bajo Shibboleth, se instala bien donde debe,
Esto no supe hacer
lo dejo y sigo.
#6 - 01/26/2014 03:45 PM - Daniel Viñar Ulriksen
Primera vez que despliego una webapp java, me perdí. vuelvo a la base de tomcat:
gunzip -c /usr/share/doc/tomcat6/README.Debian.gz | less
Habrá que ver esto:
* Tomcat is not running under a Java security manager by default. If you
expose your Tomcat instance to the internet, please consider editing
your /etc/default/tomcat6 file and set TOMCAT6_SECURITY="yes", then
adjust policy files in /etc/tomcat6/policy.d/ as explained in
http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html
* To run more than one Tomcat instance on your server, install the package
tomcat6-user and run the tomcat6-instance-create utility.
You should remove the tomcat6 package if you don't want Tomcat to
start as a daemon at boot time.
y ponerle al tomcat un frontal apache, mejor.
#7 - 01/26/2014 03:53 PM - Daniel Viñar Ulriksen
¿Qué son los $TOMCAT_HOME y otras variables? En debian, revisando los paquetes tomcat con dpkg -L tomca6$, por ej, no encuentro una carpeta que
tenga a la vez las subcarpetas: $TOMCAT_HOME/lib@, y un $TOMCAT_HOME/conf/server.xml ...
lib tenemos en: /usr/share/tomcat6/lib y conf/server.xml hay uno con enlaces simbólicos por acá:
root@curie:/var/lib/tomcat6# ls -la
total 24
drwxr-xr-x 6 root root 4096 ene 26 13:20 .
drwxr-xr-x 31 root root 4096 ene 26 13:20 ..
drwxr-xr-x 3 tomcat6 tomcat6 4096 ene 26 13:20 common
lrwxrwxrwx 1 root root 12 jul 18 2013 conf -> /etc/tomcat6
lrwxrwxrwx 1 root root 17 jul 18 2013 logs -> ../../log/tomcat6
drwxr-xr-x 3 tomcat6 tomcat6 4096 ene 26 13:20 server
drwxr-xr-x 3 tomcat6 tomcat6 4096 ene 26 13:20 shared
02/26/2020 2/8
drwxrwxr-x 3 tomcat6 tomcat6 4096 ene 26 14:54 webapps
lrwxrwxrwx 1 root root 19 jul 18 2013 work -> ../../cache/tomcat6
Y adentro está el /etc/tomcat6/conf/server.xml
debian es estricto en su empaquetamiento, pero hace bien las cosas.
Con esto podemos ver donde depositar este tomcat6-dta-ssl-1.0.0.jar y el fragmento .xml que sigue
#8 - 01/26/2014 04:51 PM - Daniel Viñar Ulriksen
Armamos el idp.xml como indicado.
Aún no arranca. Vemos en /var/log/tomcat6/catalina.out que hay un problema con los derechos de /opt/shibboleth-idp/logs/, que arreglamos:
chown tomcat6:tomcat6 -R /opt/shibboleth-idp/logs/
Pero aún sigue sin arrancar.
Volvemos sobre esto que no había sabido hacer
Cotejamos con esto donde se debe poner la carpeta endorsed con jars.
Y ahí lo arrancamos por primera vez.
#9 - 01/26/2014 04:57 PM - Daniel Viñar Ulriksen
En debian las variables de entorno se suelen configurar en los archivos de /etc/defaults por proceso
Por omisión en /etc/defaults/tomcat6 teníamos 128, cambiamos:
# JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -XX:+UseConcMarkSweepGC"
#10 - 01/26/2014 06:19 PM - Daniel Viñar Ulriksen
Hasta acá llegué, por un tunel a curie, en http://localhost:8080/idp/status:
### Operating Environment Information
operating_system: Linux
operating_system_version: 3.2.0-4-amd64
operating_system_architecture: amd64
jdk_version: 1.6.0_27
available_cores: 1
used_memory: 81MB
maximum_memory: 509MB
02/26/2020 3/8
start_time: 2014-01-26T19:23:34Z
current_time: 2014-01-26T19:23:48Z
uptime: 13983ms
### Identity Provider Information
idp_version: 2.4.0
idp_start_time: 2014-01-26T19:23:34Z
attribute_resolver_valid: true
### Relying Party Configurations
relying_party_id: anonymous
idp_entity_id: https://curie.csic.edu.uy/idp/shibboleth
default_authentication_method: none
default_signing_tls_key: MIIDMDCCAhig(...4 renglones...)OWKOGQOEHxQ==
relying_party_id: default
idp_entity_id: https://curie.csic.edu.uy/idp/shibboleth
default_authentication_method: none
default_signing_tls_key: MIIDMDCCAhig(...4 renglones...)OWKOGQOEHxQ==
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml2:query:attribute
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml1:sso
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml1:query:attribute
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml2:sso
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml2:logout
configured_communication_profile: urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml1:query:artifact
configured_communication_profile: urn:mace:shibboleth:2.0:profiles:saml2:query:artifact
(además de no ensuciar este gestor, mejor no publicamos cosas como claves... -aunque entendemos acá que son las públicas)
#11 - 01/26/2014 06:19 PM - Daniel Viñar Ulriksen
- % Done changed from 0 to 20
- Estimated time set to 5.00
#12 - 01/26/2014 06:21 PM - Daniel Viñar Ulriksen
- Estimated time changed from 5.00 to 30.00
#13 - 01/26/2014 07:19 PM - Daniel Viñar Ulriksen
Otra doc válida:
gunzip -c /usr/share/doc/libapache2-mod-shib2/README.Debian.gz | less
En particular, vemos que hay que lanzar:
shib-keygen
Y ponemnos imagenes:
<Location /shibboleth-sp>
Allow from all
</Location>
Alias /shibboleth-sp/main.css /usr/share/shibboleth/main.css
02/26/2020 4/8
Alias /shibboleth-sp/logo.jpg /usr/share/shibboleth/logo.jpg
#14 - 01/27/2014 12:54 AM - Daniel Viñar Ulriksen
Nos faltaba instalar el Servide Provider: https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLinuxInstall
Para debian: de las fuentes: https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLinuxSourceBuild
Descargamos de acá: http://shibboleth.net/downloads/service-provider/2.5.3/?
Instalo libboost-all-dev (?)
pruebo:
checking for xmltooling/base.h... yes
configure: error: unable to link with XMLTooling, or version was too old
#15 - 01/27/2014 10:45 AM - Daniel Viñar Ulriksen
Resumiendo lo que probé:
- log4shib: es un paquete de shibboleth, pero también está en los backport de la debian 7:
root@dalembert:/etc/apache2/sites-available# aptitude search log4shib
p liblog4shib-dev - log4j-style configurable logging library for C++ (development)
p liblog4shib-doc - log4j-style configurable logging library for C++ (API docs)
c liblog4shib1 - log4j-style configurable logging library for C++ (runtime)
root@dalembert:/etc/apache2/sites-available# aptitude versions log4shib
Package liblog4shib-dev:
p 1.0.4-1 stable 500
Package liblog4shib-doc:
p 1.0.4-1 stable 500
Package liblog4shib1:
p 1.0.4-1 stable 500
Trabajé con la versión de Shiboleth, como ven nos podría faltar probar con la de los backport (que es más antigua)
Esto anduvo:
./configure --disable-static --disable-doxygen --prefix=/opt/shibboleth-sp
y luego make y make install también, luego de haber ido instalando todo lo que daba error por ausencia, en particular las librerías boost que menciona la
doc.
- Xerces-C:
Este paquete y los que siguen son de la distribución debian. Primero probé bajar los *-dev, pero no alcanzaba. Bajé luego las fuentes:
aptitude search xerc
para identificar el nombre exacto, y:
02/26/2020 5/8
apt-get sources Package libxerces-c3.1
Esto funcionó:
./configure --prefix=/opt/shibboleth-sp --disable-netaccessor-libcurl
- XML-Security-C: ./configure --without-xalan --disable-static --prefix=/opt/shibboleth-sp
igual que el precedente, funcionó.
- XMLTooling-C: ./configure --with-log4shib=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp -C
idem, este también funcioó, pero luego fue incriminado de senil en compilaciones siguientes.
Ubicamos una versión más reciente en los backports, nombrada en debian: libxmltooling6
también probamos con esta, per no resolvió los problemas que siguieron.
- OpenSAML-C: ./configure --with-log4shib=/opt/shibboleth-sp --prefix=/opt/shibboleth-sp -C
Este también es un paquete de shibboleth. Pero probamos con la versión de distribución.
Probamos con la versión estable 2.4.3 y con la de los backport 2.5.3
Faltaría probar con la que distribuye shibboleth
Fue acá que el problema de Luego de ir lideando con varios errores, en particular algunos que decían "XMLtooling is too old", éste es el último error en el
make:
Making all in samlsign
make[2]: se ingresa al directorio `/root/Shibboleth/opensaml/opensaml2-2.4.3/samlsign'
/bin/bash ../libtool --silent --tag=CXX --mode=link g++ -pthread -Wall -O2 -DNDEBUG -o samlsign samlsign.o ../saml/libsaml.la -lxmltooling
-lxml-security-c -lxerces-c -L/usr/lib -llog4cpp -lnsl -lz
/usr/bin/ld: warning: libxml-security-c.so.16, needed by /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxmltooling.so, may conflict with
libxml-security-c.so.17
../saml/.libs/libsaml.so: undefined reference to `virtual thunk to xmltooling::AbstractAttributeExtensibleXMLObject::getExtensionAttributes() const'
../saml/.libs/libsaml.so: undefined reference to `virtual thunk to xmltooling::AbstractSimpleElement::hasChildren() const'
../saml/.libs/libsaml.so: undefined reference to `virtual thunk to xmltooling::AbstractComplexElement::getOrderedChildren() const'
...
- Shibboleth: ./configure --with-log4shib=/opt/shibboleth-sp --enable-apache-13 --with-apxs=/usr/local/apache/bin/apxs --enable-apache-20
--with-apxs2=/usr/local/apache2/bin/apxs --prefix=/opt/shibboleth-sp
Shibboleth en sí, nunca lo llegamos a compilar
Otros tips probados:
Para que se considere la librería adecuada, y para probar varias combinaciones de librerías, hicimos trucos en /usr/lib/x86_64-linux-gnu/, con ln, como:
root@curie:/usr/lib/x86_64-linux-gnu# ln -sf /opt/shibboleth-sp/lib/libxmltooling.so libxmltooling.so
Para tener:
root@curie:/usr/lib/x86_64-linux-gnu# ls -la libxmltoo*
lrwxrwxrwx 1 root root 27 ene 31 2012 libxmltooling-lite.so -> libxmltooling-lite.so.5.0.2
02/26/2020 6/8
lrwxrwxrwx 1 root root 27 ene 31 2012 libxmltooling-lite.so.5 -> libxmltooling-lite.so.5.0.2
-rw-r--r-- 1 root root 858208 ene 31 2012 libxmltooling-lite.so.5.0.2
lrwxrwxrwx 1 root root 39 ene 26 23:28 libxmltooling.so -> /opt/shibboleth-sp/lib/libxmltooling.so
lrwxrwxrwx 1 root root 22 ene 31 2012 libxmltooling.so.5 -> libxmltooling.so.5.0.2
-rw-r--r-- 1 root root 3614928 ene 31 2012 libxmltooling.so.5.0.2
y similares...
#16 - 02/15/2014 01:47 PM - Daniel Viñar Ulriksen
- Description updated
Estoy probando este método de instalación de SWITCH, la red académica suiza.
Propone un .deb compilado. Agrego la firma y el repo de switch.
#17 - 02/15/2014 01:49 PM - Daniel Viñar Ulriksen
La doc aún habla de la squeeze y de la wheezy: http://pkg.switch.ch/switchaai/debian/dists/wheezy/main/binary-amd64/httpd/
#18 - 02/17/2014 11:47 AM - Daniel Viñar Ulriksen
Aquí: https://www.switch.ch/aai/demo/2/simple.html hay una ilustración clara de lo que es un IdP y un SP. Lo que necesitamos explorar es un IdP.
Acá hay un howto de instalación completa: https://www.switch.ch/aai/docs/shibboleth/SWITCH/latest/idp/deployment/
Este incluye:
The example values used in this guide are:
(...)
ldap.example.org
The name of the LDAP server where the user attributes are stored.
Es decir que previo al Shibboleth IdP, necesitamos algún LDAP serio y bien hecho... (con un esquema claro y un front-end) vuelta al planteamiento previo.
#19 - 12/26/2014 02:36 PM - Andrés Pías
- Assignee changed from Daniel Viñar Ulriksen to Andrés Pías
Daniel Viñar Ulriksen escribió:
Aquí: https://www.switch.ch/aai/demo/2/simple.html hay una ilustración clara de lo que es un IdP y un SP. Lo que necesitamos explorar es un IdP.
Acá hay un howto de instalación completa: https://www.switch.ch/aai/docs/shibboleth/SWITCH/latest/idp/deployment/
02/26/2020 7/8
Voy a retomar esta tarea. Voy a seguir esta guía para instalar un Idp. Lo estaba por hacer en una virtual mía pero sigo en Curie que es de pruebas.
#20 - 12/26/2014 04:45 PM - Andrés Pías
- % Done changed from 20 to 30
Estuve instalando, luego subo doc.. llegué hasta la parte '8. User Authentication'
#21 - 01/25/2015 03:37 PM - Andrés Pías
Aplique todo el procedimiento para re-instalar el Idp pero no me funcionó la conexión hacia el LDAP Server. Estoy instalando todo en una virtual local en
#3971
#22 - 01/28/2015 09:43 PM - Andrés Pías
- % Done changed from 30 to 70
Logre dejar Instalado el IdP en Curie y un SP desde Freud. Probé proteger un directorio (el recurso) y funcionó. Me queda documentar un poco más.
#23 - 04/17/2015 12:11 PM - Andrés Pías
- Status changed from En curso to Resuelta
- % Done changed from 70 to 80
Quedó todo documentado en [[Shibboleth]]
#24 - 04/17/2015 12:11 PM - Andrés Pías
- Assignee changed from Andrés Pías to Cielito - LDAP
#25 - 07/09/2015 05:00 PM - Andrés Pías
- Status changed from Resuelta to Cerrada
02/26/2020 8/8