Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docpublic:systemes:shibboleth:idpv3xc8 [2020/06/04 20:24]
procacci@tem-tsp.eu [firewall]
docpublic:systemes:shibboleth:idpv3xc8 [2020/07/04 15:15] (current)
procacci@tem-tsp.eu [proxy et TLS via apache]
Line 219: Line 219:
 ==== acces tomcat ==== ==== acces tomcat ====
  
-le serveur est maintenant acessible , exemple +le serveur est maintenant accessible , exemple 
  
-http://idp3.tem-tsp.eu:8080/manager/html (login/pass definit plus haut) +http://idpx.tem-tsp.eu:8080/manager/html (login/pass definit plus haut) 
  
-==== proxy-ajp et TLS via apache =====+sauf si l'adresse ip source de consultation n'est pas autorisé par le control d'acces de l'application manager , cf adresse IP dans le parametre allow : 
  
-mise en place d'un proxy ajp pour une gestion de TLS et ports par defaut (80/443) par apache +<code> 
 +[root@idpx ~]# vim /opt/tomcat/webapps/manager/META-INF/context.xml  
 + 
 +<Context antiResourceLocking="false" privileged="true"
 +  <Valve className="org.apache.catalina.valves.RemoteAddrValve" 
 +         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|192.168.0.10|10.10.10.11" /> 
 +  <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/> 
 +</Context> 
 +</code> 
 +==== proxy et TLS via apache ===== 
 + 
 +https://tomcat.apache.org/tomcat-9.0-doc/proxy-howto.html 
 +https://tomcat.apache.org/tomcat-9.0-doc/connectors.html 
 +https://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp (secretRequired="false"
 + 
 + 
 +mise en place d'un proxy pour une gestion de TLS et ports par defaut (80/443) par apache 
 il faut installer le mod_ssl d'apache pour disposer d'https  il faut installer le mod_ssl d'apache pour disposer d'https 
  
Line 239: Line 255:
  
 <code> <code>
-[root@idex certs]#grep ^SSL /etc/httpd/conf.d/ssl.conf | tail -3+[root@idpx certs]#grep ^SSL /etc/httpd/conf.d/ssl.conf | tail -3
 SSLCertificateFile /etc/pki/tls/certs/idp.imtbstsp_eu.pem SSLCertificateFile /etc/pki/tls/certs/idp.imtbstsp_eu.pem
 SSLCertificateKeyFile /etc/pki/tls/private/idp.imtbstsp.key SSLCertificateKeyFile /etc/pki/tls/private/idp.imtbstsp.key
Line 252: Line 268:
 ProxyPass /manager/ ajp://127.0.0.1:8009/manager/ ProxyPass /manager/ ajp://127.0.0.1:8009/manager/
 </code> </code>
 +
 +et l'activer coté tomcat 
 +
 +<code>
 +[root@idpx opt]# vim /opt/tomcat/conf/server.xml 
 +<!-- Define an AJP 1.3 Connector on port 8009 -->
 + <Connector protocol="AJP/1.3"
 +               port="8009"
 +               secretRequired="false"
 +               address="127.0.0.1"
 +               redirectPort="8443" />
 +</code>
 +
 +sans l'option secretRequired="false" (cf https://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp ) , impossible d'acceder au manager via proxy_ajp, il faudrai mieux controler cet acces en limitant les acces proxy uniquement a 127.0.0.1 entre httpd et tomcat . 
  
 lancement httpd et verification de la presence du module AJP lancement httpd et verification de la presence du module AJP
docpublic/systemes/shibboleth/idpv3xc8.1591302289.txt.gz · Last modified: 2020/06/04 20:24 by procacci@tem-tsp.eu
[unknown link type]Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0