Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:apache_tomcat_7_-_ldap-authentifizierung_jndirealm

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:apache_tomcat_7_-_ldap-authentifizierung_jndirealm [2015/05/07 17:01] klaustachtler:apache_tomcat_7_-_ldap-authentifizierung_jndirealm [2015/05/07 18:20] (aktuell) – [/etc/tomcat/tomcat-users.xml] klaus
Zeile 527: Zeile 527:
 === Bereich: Server | GlobalNamingResources === === Bereich: Server | GlobalNamingResources ===
  
-Nachfogeme Änderungen **deaktivieren** die Nutzung der Konfigurationsdatei+Nachfolgende Änderungen **deaktivieren** die Nutzung der Konfigurationsdatei
   * ''/etc/tomcat/tomcat-users.xml''   * ''/etc/tomcat/tomcat-users.xml''
-durch den[[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Server:+durch den [[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Server zur Authentifizierung der nachfolgenden, oder auch anderer Web-Anwendungen: 
 +  * **''tomcat-admin-webapps''** - [[http://tomcat.apache.org/|Apache Tomcat]]-Administrative Web-Anwendungen (host-manager, manager) 
 <code xml> <code xml>
   <GlobalNamingResources>   <GlobalNamingResources>
Zeile 546: Zeile 548:
 === Bereich: Server | Service | Engine | Realm === === Bereich: Server | Service | Engine | Realm ===
  
-Nachfogeme Änderungen **deaktivieren** die Nutzung der Konfigurationsdatei+Nachfolgende Änderungen **deaktivieren** die Nutzung der Konfigurationsdatei
   * ''/etc/tomcat/tomcat-users.xml''   * ''/etc/tomcat/tomcat-users.xml''
-durch den[[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Server:+durch den [[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Server zur Authentifizierung der nachfolgenden, oder auch anderer Web-Anwendungen: 
 +  * **''tomcat-admin-webapps''** - [[http://tomcat.apache.org/|Apache Tomcat]]-Administrative Web-Anwendungen (host-manager, manager)
  
 <code xml> <code xml>
Zeile 564: Zeile 567:
 </code> </code>
  
 +==== /etc/tomcat/context.xml ====
 +
 +Die Konfigurationsdatei 
 +  * **''/etc/tomcat/context.xml''**
 +ist unter [[http://centos.org|CentOS]] in der **Version 7.x** die Konfigurationsdatei des [[http://tomcat.apache.org/|Apache Tomcat]]-Applikation-Servers welche nachfogende Konfiguration für **jede** Web-Applikation zur verfügung stellt.
 +
 +Nachfolgend sollen einige Änderungen bzw. Ergänzungen an dieser Konfigurationsdatei durchgeführt werden, welchen ein Kommentar, wie nachfolgend dargestellt, voransteht:
 +<code>
 +<!-- Tachtler -->
 +</code>
 +
 +Hier die **komplette Konfigurationsdatei** mit allen Änderungen bzw. Ergänzungen, welche ebenfalls nachfolgend erklärt werden:
 +<code xml>
 +<?xml version='1.0' encoding='utf-8'?>
 +<!--
 +  Licensed to the Apache Software Foundation (ASF) under one or more
 +  contributor license agreements.  See the NOTICE file distributed with
 +  this work for additional information regarding copyright ownership.
 +  The ASF licenses this file to You under the Apache License, Version 2.0
 +  (the "License"); you may not use this file except in compliance with
 +  the License.  You may obtain a copy of the License at
 +
 +      http://www.apache.org/licenses/LICENSE-2.0
 +
 +  Unless required by applicable law or agreed to in writing, software
 +  distributed under the License is distributed on an "AS IS" BASIS,
 +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +  See the License for the specific language governing permissions and
 +  limitations under the License.
 +-->
 +<!-- The contents of this file will be loaded for each web application -->
 +<Context>
 +
 +    <!-- Default set of monitored resources -->
 +    <WatchedResource>WEB-INF/web.xml</WatchedResource>
 +
 +    <!-- Tachtler -->
 +    <!-- Enable LDAP authentication -->
 +    <Realm className="org.apache.catalina.realm.JNDIRealm" 
 +        connectionName="cn=Ersatzbenutzer,dc=tachtler,dc=net"
 +    connectionPassword="geheim"
 +         connectionURL="ldaps://ldap.idmz.tachtler.net:636"
 +           userPattern="uid={0},ou=People,dc=tachtler,dc=net"
 +              roleBase="ou=TomcatRoles,dc=tachtler,dc=net"
 +              roleName="cn"
 +            roleSearch="(uniqueMember={0})"
 +    />
 +
 +    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
 +    <!--
 +    <Manager pathname="" />
 +    -->
 +
 +    <!-- Uncomment this to enable Comet connection tacking (provides events
 +         on session expiration as well as webapp lifecycle) -->
 +    <!--
 +    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
 +    -->
 +
 +</Context>
 +</code>
 +
 +=== Bereich: Context ===
 +
 +Nachfolgende Änderungen **aktivieren** die Nutzung die Nutzung eines LDAP_Servers durch den [[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Server zur Authentifizierung der nachfolgenden, oder auch anderer Web-Anwendungen, des [[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Servers dar.
 +  * **''tomcat-admin-webapps''** - [[http://tomcat.apache.org/|Apache Tomcat]]-Administrative Web-Anwendungen (host-manager, manager)
 +
 +<code xml>
 +    <!-- Tachtler -->
 +    <!-- Enable LDAP authentication -->
 +    <Realm className="org.apache.catalina.realm.JNDIRealm" 
 +        connectionName="cn=Ersatzbenutzer,dc=tachtler,dc=net"
 +    connectionPassword="geheim"
 +         connectionURL="ldaps://ldap.idmz.tachtler.net:636"
 +           userPattern="uid={0},ou=People,dc=tachtler,dc=net"
 +              roleBase="ou=TomcatRoles,dc=tachtler,dc=net"
 +              roleName="cn"
 +            roleSearch="(uniqueMember={0})"
 +    />
 +</code>
 +
 +==== /etc/tomcat/tomcat-users.xml ====
 +
 +Die Konfigurationsdatei 
 +  * **''/etc/tomcat/tomcat-users.xml''**
 +stellt eine **Standard**-Konfigurationsdatei zur Authentifizierung der nachfolgenden, oder auch anderer Web-Anwendungen, des [[http://tomcat.apache.org/|Apache Tomcat]]-Applikations-Servers dar.
 +  * **''tomcat-admin-webapps''** - [[http://tomcat.apache.org/|Apache Tomcat]]-Administrative Web-Anwendungen (host-manager, manager)
 +
 +:!: **WICHTIG** - **Änderungen zur __Aktivierung__ von Rollen und Benutzer, wie unter nachfolgendem internen Link**
 +  * Siehe auch den internen Link: [[tachtler:apache_tomcat_7#etc_tomcat_tomcat-usersxml|Apache Tomcat 7 - /etc/tomcat/tomcat-users.xml]]
 +**__sollten__ wieder __rückgängig gemacht werden__**
 +
 +Nachfolgend die **komplette Konfigurationsdatei** (**wie nach der original Installation ausgeliefert**):
 +<code xml>
 +<?xml version='1.0' encoding='utf-8'?>
 +<!--
 +  Licensed to the Apache Software Foundation (ASF) under one or more
 +  contributor license agreements.  See the NOTICE file distributed with
 +  this work for additional information regarding copyright ownership.
 +  The ASF licenses this file to You under the Apache License, Version 2.0
 +  (the "License"); you may not use this file except in compliance with
 +  the License.  You may obtain a copy of the License at
 +
 +      http://www.apache.org/licenses/LICENSE-2.0
 +
 +  Unless required by applicable law or agreed to in writing, software
 +  distributed under the License is distributed on an "AS IS" BASIS,
 +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +  See the License for the specific language governing permissions and
 +  limitations under the License.
 +-->
 +<tomcat-users>
 +<!--
 +  NOTE:  By default, no user is included in the "manager-gui" role required
 +  to operate the "/manager/html" web application.  If you wish to use this app,
 +  you must define such a user - the username and password are arbitrary.
 +-->
 +<!--
 +  NOTE:  The sample user and role entries below are wrapped in a comment
 +  and thus are ignored when reading this file. Do not forget to remove
 +  <!.. ..> that surrounds them.
 +-->
 +<!--
 +  <role rolename="tomcat"/>
 +  <role rolename="role1"/>
 +  <user username="tomcat" password="tomcat" roles="tomcat"/>
 +  <user username="both" password="tomcat" roles="tomcat,role1"/>
 +  <user username="role1" password="tomcat" roles="role1"/>
 +-->
 +
 +<!-- <role rolename="admin"/> -->
 +<!-- <role rolename="admin-gui"/> -->
 +<!-- <role rolename="admin-script"/> -->
 +<!-- <role rolename="manager"/> -->
 +<!-- <role rolename="manager-gui"/> -->
 +<!-- <role rolename="manager-script"/> -->
 +<!-- <role rolename="manager-jmx"/> -->
 +<!-- <role rolename="manager-status"/> -->
 +<!-- <user name="admin" password="adminadmin" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" /> -->
 +</tomcat-users>
 +</code>
  
tachtler/apache_tomcat_7_-_ldap-authentifizierung_jndirealm.1431010914.txt.gz · Zuletzt geändert: 2015/05/07 17:01 von klaus