You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2013/12/25 07:31:55 UTC
svn commit: r1553356 [30/31] - in /karaf/site/production/manual/latest: ./
commands/ developers-guide/ users-guide/
Modified: karaf/site/production/manual/latest/users-guide/security.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/security.html?rev=1553356&r1=1553355&r2=1553356&view=diff
==============================================================================
--- karaf/site/production/manual/latest/users-guide/security.html (original)
+++ karaf/site/production/manual/latest/users-guide/security.html Wed Dec 25 06:31:51 2013
@@ -8,7 +8,7 @@
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
<title>
- Apache Karaf 3.0.0-SNAPSHOT Guides
+ Apache Karaf 3.0.1-SNAPSHOT Guides
</title>
</head>
<body>
@@ -93,7 +93,7 @@
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
- <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><li><a hre
f="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.html">Developer Com
mands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-
guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a
href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command
s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a
href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
</div>
</div>
</div>
@@ -101,18 +101,174 @@
</td>
<td height="100%" width="100%">
<div class="wiki-content">
-<h1 id="Security">Security</h1><h2 id="Managingusersandpasswords">Managing users and passwords</h2><p>The default security configuration uses a property file located at <tt>etc/users.properties</tt> to store authorized users and their passwords.</p><p>The default user name is <tt>karaf</tt> and the associated password is <tt>karaf</tt> too. We strongly encourage you to change the default password by editing the above file before moving Karaf into production.</p><p>The users are currently used in three different places in Karaf:</p><ul><li>access to the SSH console</li><li>access to the JMX management layer</li><li>access to the Web console<p>Those three ways all delegate to the same JAAS based security authentication.</p><p>The <tt>users.properties</tt> file contains one or more lines, each line defining a user, its password and the associated roles.</p><pre>
-user=password[,role][,role]...
-</pre></li></ul><h2 id="Managingroles">Managing roles</h2><p>JAAS roles can be used by various components. The three management layers (SSH, JMX and WebConsole) all use a global role based authorization system. The default role name is configured in the <tt>etc/system.properties</tt> using the <tt>karaf.admin.role</tt> system property and the default value is <tt>admin</tt>. All users authenticating for the management layer must have this role defined.</p><p>The syntax for this value is the following:</p><pre>
-[classname:]principal
-</pre><p>where classname is the class name of the principal object (defaults to org.apache.karaf.jaas.modules.RolePrincipal) and principal is the name of the principal of that class (defaults to admin).</p><p>Note that roles can be changed for a given layer using ConfigAdmin in the following configurations:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Layer </th><th class="confluenceTh"> PID </th><th class="confluenceTh"> Value </th></tr><tr><td class="confluenceTd"> SSH </td><td class="confluenceTd"> org.apache.karaf.shell </td><td class="confluenceTd"> sshRole </td></tr><tr><td class="confluenceTd"> JMX </td><td class="confluenceTd"> org.apache.karaf.management </td><td class="confluenceTd"> jmxRole </td></tr><tr><td class="confluenceTd"> Web </td><td class="confluenceTd"> org.apache.karaf.webconsole </td><td class="confluenceTd"> role </td></tr></table></div><h2 id="Enablingpasswordencryption">
Enabling password encryption</h2><p>In order to not keep the passwords in plain text, the passwords can be stored encrypted in the configuration file.<br/>This can be easily enabled using the following commands:</p><pre>
-config:propset -p org.apache.karaf.jaas encryption.enabled true
-system:shutdown -r -f
-</pre><p>The passwords will be encrypted automatically in the <tt>etc/users.properties</tt> configuration file the first time the user logs in.<br/>Encrypted passwords are prepended with <tt>{CRYPT}</tt> so that are easy to recognize.</p><h2 id="Managingrealms">Managing realms</h2><p>More information about modifying the default realm or deploying new realms is provided in the <a href="../developers-guide/security-framework.html">developers guide</a>.</p><h2 id="Deployingsecurityproviders">Deploying security providers</h2><p>Some applications require specific security providers to be available, such as <a href="http://www.bouncycastle.org">BouncyCastle</a>. The JVM impose some restrictions about the use of such jars: they have to be signed and be available on the boot classpath. One way to deploy those providers is to put them in the JRE folder at <tt>$JAVA_HOME/jre/lib/ext</tt> and modify the security policy configuration (<tt>$JAVA_HOME/jre/lib/security/java.security</tt>) in ord
er to register such providers.</p><p>While this approach works fine, it has a global effect and requires you to configure all your servers accordingly.</p><p>Karaf offers a simple way to configure additional security providers:</p><ul><li>put your provider jar in <tt>lib/ext</tt></li><li>modify the <tt>etc/config.properties</tt> configuration file to add the following property</li></ul><pre>
+<h1 id="Security">Security</h1><p>Apache Karaf provides an advanced and flexible security system, powered by JAAS (Java Authentication and Authorization<br/>Service) in an OSGi compliant way.</p><p>It provides a dynamic security system.</p><p>The Apache Karaf security framework is used internally to control the access to:</p><ul><li>the OSGi services (described in the developer guide)</li><li>the console commands</li><li>the JMX layer</li><li>the WebConsole</li></ul><p>Your applications can also use the security framework (see the developer guide for details).</p><h2 id="Realms">Realms</h2><p>Apache Karaf is able to manage multiple realms. A realm contains the definition of the login modules to use for the<br/>authentication and/or authorization on this realm. The login modules define the authentication and authorization for<br/>the realm.</p><p>The <tt>jaas:realm-list</tt> command list the current defined realms:</p><pre>
+karaf@root()> jaas:realm-list
+Index | Realm Name | Login Module Class Name
+-----------------------------------------------------------------------------------
+1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
+</pre><p>You can see that the Apache Karaf provides a default realm named <tt>karaf</tt>.</p><p>This realm has two login modules:</p><ul><li>the <tt>PropertiesLoginModule</tt> uses the <tt>etc/users.properties</tt> file as backend for users, groups, roles and password.<p> This login module authenticates the users and returns the users' roles.</p></li><li>the <tt>PublickeyLoginModule</tt> is especially used by the SSHd. It uses the <tt>etc/keys.properties</tt> file. This file contains<p> the users and a public key associated to each user.</p><p>Apache Karaf provides additional login modules (see later):</p></li><li>JDBCLoginModule uses a database as backend</li><li>LDAPLoginModule uses a LDAP server as backend</li><li>OsgiConfigLoginModule uses a configuration as backend</li></ul><p>You can manage an existing realm, login module, or create your own realm using the <tt>jaas:realm-manage</tt> command.</p><h2 id="Usersgroupsrolesandpasswords">Users, groups, roles, and passwords</h2><p>A
s we saw, by default, Apache Karaf uses a PropertiesLoginModule.</p><p>This login module uses the <tt>etc/users.properties</tt> file as storage for the users, groups, roles and passwords.</p><p>The initial <tt>etc/users.properties</tt> file contains:</p><pre>
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# This file contains the users, groups, and roles.
+# Each line has to be of the format:
+#
+# USER=PASSWORD,ROLE1,ROLE2,...
+# USER=PASSWORD,_g_:GROUP,...
+# _g_\:GROUP=ROLE1,ROLE2,...
+#
+# All users, grousp, and roles entered in this file are available after Karaf startup
+# and modifiable via the JAAS command group. These users reside in a JAAS domain
+# with the name "karaf".
+#
+karaf = karaf,_g_:admingroup
+_g_\:admingroup = group,admin,manager,viewer
+</pre><p>We can see in this file, that we have one user by default: <tt>karaf</tt>.<br/>The default password is <tt>karaf</tt>.</p><p>The <tt>karaf</tt> user is member of one group: the <tt>admingroup</tt>.</p><p>A group is always prefixed by <tt><em>g</em>:</tt>. An entry without this prefix is an user.</p><p>A group defines a set of roles. By default, the <tt>admingroup</tt> defines <tt>group</tt>, <tt>admin</tt>, <tt>manager</tt>, and <tt>viewer</tt><br/>roles.</p><p>It means that the <tt>karaf</tt> user will have the roles defined by the <tt>admingroup</tt>.</p><h3 id="Commands">Commands</h3><p>The <tt>jaas:*</tt> commands manage the realms, users, groups, roles in the console.</p><h4 id="jaasrealmlist"><tt>jaas:realm-list</tt></h4><p>We already used the <tt>jaas:realm-list</tt> previously in this section.</p><p>The <tt>jaas:realm-list</tt> command list the realm and the login modules for each realm:</p><pre>
+karaf@root()> jaas:realm-list
+Index | Realm Name | Login Module Class Name
+-----------------------------------------------------------------------------------
+1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
+</pre><p>We have here one realm (<tt>karaf</tt>) containing two login modules (<tt>PropertiesLoginModule</tt> and <tt>PublickeyLoginModule</tt>).</p><p>The <tt>index</tt> is used by the <tt>jaas:realm-manage</tt> command to easily identify the realm/login module that we want to manage.</p><h4 id="jaasrealmmanage"><tt>jaas:realm-manage</tt></h4><p>The <tt>jaas:realm-manage</tt> command switch in realm/login module edit mode, where you can manage the users, groups, and roles in the login module.</p><p>To identify the realm and login module that you want to manage, you can use the <tt>--index</tt> option.<br/>The indexes are displayed by the <tt>jaas:realm-list</tt> command:</p><pre>
+karaf@root()> jaas:realm-manage --index 1
+</pre><p>Another way is to use the <tt>--realm</tt> and <tt>--module</tt> options. The <tt>--realm</tt> option expects the realm name, and the <tt>--module</tt><br/>option expects the login module class name:</p><pre>
+karaf@root()> jaas:realm-manage --realm karaf --module org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+</pre><h4 id="jaasuserlist"><tt>jaas:user-list</tt></h4><p>When you are in edit mode, you can list the users in the login module using the <tt>jaas:user-list</tt>:</p><pre>
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+</pre><p>You can see the user name and the group by role.</p><h4 id="jaasuseradd"><tt>jaas:user-add</tt></h4><p>The <tt>jaas:user-add</tt> command adds a new user (and the password) in the currently edited login module:</p><pre>
+karaf@root()> jaas:user-add foo bar
+</pre><p>To "commit" your change (here the user addition), you have to execute the <tt>jaas:update</tt> command:</p><pre>
+karaf@root()> jaas:update
+karaf@root()> jaas:realm-manage --index 1
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+foo | |
+</pre><p>On the other hand, if you want to rollback the user addition, you can use the <tt>jaas:cancel</tt> command.</p><h4 id="jaasuserdelete"><tt>jaas:user-delete</tt></h4><p>The <tt>jaas:user-delete</tt> command deletes an user from the currently edited login module:</p><pre>
+karaf@root()> jaas:user-delete foo
+</pre><p>Like for the <tt>jaas:user-add</tt> command, you have to use the <tt>jaas:update</tt> to commit your change (or <tt>jaas:cancel</tt> to rollback):</p><pre>
+karaf@root()> jaas:update
+karaf@root()> jaas:realm-manage --index 1
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+</pre><h4 id="jaasgroupadd"><tt>jaas:group-add</tt></h4><p>The <tt>jaas:group-add</tt> command assigns a group (and eventually creates the group) to an user in the currently edited login module:</p><pre>
+karaf@root()> jaas:group-add karaf mygroup
+</pre><h4 id="jaasgroupdelete"><tt>jaas:group-delete</tt></h4><p>The <tt>jaas:group-delete</tt> command removes an user from a group in the currently edited login module:</p><pre>
+karaf@root()> jaas:group-delete karaf mygroup
+</pre><h4 id="jaasgrouproleadd"><tt>jaas:group-role-add</tt></h4><p>The <tt>jaas:group-role-add</tt> command adds a role in a group in the currently edited login module:</p><pre>
+karaf@root()> jaas:group-role-add mygroup myrole
+</pre><h4 id="jaasgrouproledelete"><tt>jaas:group-role-delete</tt></h4><p>The <tt>jaas:group-role-delete</tt> command removes a role from a group in the currently edited login module:</p><pre>
+karaf@root()> jaas:group-role-delete mygroup myrole
+</pre><h4 id="jaasupdate"><tt>jaas:update</tt></h4><p>The <tt>jaas:update</tt> command commits your changes in the login module backend. For instance, in the case of the PropertiesLoginModule,<br/>the <tt>etc/users.properties</tt> will be updated only after the execution of the <tt>jaas:update</tt> command.</p><h4 id="jaascancel"><tt>jaas:cancel</tt></h4><p>The <tt>jaas:cancel</tt> command rollback your changes and doesn't update the login module backend.</p><h2 id="Passwordsencryption">Passwords encryption</h2><p>By default, the passwords are stored in clear form in the <tt>etc/users.properties</tt> file.</p><p>It's possible to enable encryption in the <tt>etc/org.apache.karaf.jaas.cfg</tt> configuration file:</p><pre>
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# Boolean enabling / disabling encrypted passwords
+#
+encryption.enabled = false
+
+#
+# Encryption Service name
+# the default one is 'basic'
+# a more powerful one named 'jasypt' is available
+# when installing the encryption feature
+#
+encryption.name =
+
+#
+# Encryption prefix
+#
+encryption.prefix = {CRYPT}
+
+#
+# Encryption suffix
+#
+encryption.suffix = {CRYPT}
+
+#
+# Set the encryption algorithm to use in Karaf JAAS login module
+# Supported encryption algorithms follow:
+# MD2
+# MD5
+# SHA-1
+# SHA-256
+# SHA-384
+# SHA-512
+#
+encryption.algorithm = MD5
+
+#
+# Encoding of the encrypted password.
+# Can be:
+# hexadecimal
+# base64
+#
+encryption.encoding = hexadecimal
+</pre><p>If the <tt>encryption.enabled</tt> property is set to true, the password encryption is enabled.</p><p>With encryption enabled, the password are encrypted at the first time an user logs in. The encrypted passwords are<br/>prefixed and suffixed with <tt>{CRYPT}</tt>. To re-encrypt the password, you can reset the password in clear (in <tt>etc/users.properties</tt><br/>file), without the <tt>{CRYPT}</tt> prefix and suffix. Apache Karaf will detect that this password is in clear (because it's not<br/>prefixed and suffixed with <tt>{CRYPT}</tt>) and encrypt it again.</p><p>The <tt>etc/org.apache.karaf.jaas.cfg</tt> configuration file allows you to define advanced encryption behaviours:</p><ul><li>the <tt>encryption.prefix</tt> property defines the prefix to "flag" a password as encrypted. The default is <tt>{CRYPT}</tt>.</li><li>the <tt>encryption.suffix</tt> property defines the suffix to "flag" a password as encrypted. The default is <tt>{CRYPT}</tt>.</li><li>the <tt>encryption
.algorithm</tt> property defines the algorithm to use for encryption (digest). The possible values are <tt>MD2</tt>, <tt>MD5</tt>,<p><tt>SHA-1</tt>, <tt>SHA-256</tt>, <tt>SHA-384</tt>, <tt>SHA-512</tt>. The default is <tt>MD5</tt>.</p></li><li>the <tt>encryption.encoding</tt> property defines the encoding of the encrypted password. The possible values are <tt>hexadecimal</tt><p> or <tt>base64</tt>. The default value is <tt>hexadecimal</tt>.</p><h2 id="RBAC">RBAC</h2><p>Apache Karaf uses the roles to control the access to the resources: it's a RBAC (Role Based Access Control) system.</p><p>The roles are used to control:</p></li><li>access to OSGi services</li><li>access to the console (control the execution of the commands)</li><li>access to JMX (MBeans and/or operations)</li><li>access to the WebConsole</li></ul><h3 id="OSGiservices">OSGi services</h3><p>The details about OSGi services RBAC support is explained in the developer guide.</p><h3 id="Console">Console</h3><p>Console RBAC
supports is a specialization of the OSGi service RBAC. Actually, in Apache Karaf, all console commands are<br/>defined as OSGi services.</p><p>The console command name follows the <tt>scope:name</tt> format.</p><p>The ACL (Access Lists) are defined in <tt>etc/org.apache.karaf.command.acl.<scope>.cfg</tt> configuration files, where <tt><scope></tt><br/>is the commands scope.</p><p>For instance, we can define the ACL to the <tt>feature:*</tt> commands by creating a <tt>etc/org.apache.karaf.command.acl.feature.cfg</tt><br/>configuration file. In this <tt>etc/org.apache.karaf.command.acl.feature.cfg</tt> configuration file, we can set:</p><pre>
+list = viewer
+info = viewer
+install = admin
+uninstall = admin
+</pre><p>Here, we define that <tt>feature:list</tt> and <tt>feature:info</tt> commands can be executed by users with <tt>viewer</tt> role, whereas<br/>the <tt>feature:install</tt> and <tt>feature:uninstall</tt> commands can only be executed by users with <tt>admin</tt> role.<br/>Note that users in the admin group will also have viewer role, so will be able to do everything.</p><p>Apache Karaf command ACLs can control access using (inside a given command scope):</p><ul><li>the command name regex (e.g. <tt>name = role</tt>)</li><li>the command name and options or arguments values regex (e.g. <tt>name[/.<strong><a href="0-9.html">0-9</a><a href="0-9.html">0-9</a><a href="0-9.html">0-9</a>+.</strong>/] = role</tt> to execute name only with argument value above 100)</li></ul><p>Both command name and options/arguments support exact matching or regex matching.</p><p>By default, Apache Karaf defines the following commands ACLs:</p><ul><li><tt>etc/org.apache.karaf.command.acl.bundle.cfg</tt>
configuration file defines the ACL for <tt>bundle:*</tt> commands.<p> This ACL limits the execution of <tt>bundle:*</tt> commands for system bundles only to the users with <tt>admin</tt> role, whereas<br/> <tt>bundle:*</tt> commands for non-system bundles can be executed by the users with <tt>manager</tt> role.</p></li><li><tt>etc/org.apache.karaf.command.acl.config.cfg</tt> configuration file defines the ACL for <tt>config:*</tt> commands.<p> This ACL limits the execution of <tt>config:*</tt> commands with <tt>jmx.acl.*</tt>, <tt>org.apache.karaf.command.acl.*</tt>, and<br/> <tt>org.apache.karaf.service.acl.*</tt> configuration PID to the users with <tt>admin</tt> role. For the other configuration PID,<br/> the users with the <tt>manager</tt> role can execute <tt>config:*</tt> commands.</p></li><li><tt>etc/org.apache.karaf.command.acl.feature.cfg</tt> configuration file defines the ACL for <tt>feature:*</tt> commands.<p> Only the users with <tt>admin</tt> role can execute <tt>feat
ure:install</tt> and <tt>feature:uninstall</tt> commands. The other <tt>feature:*</tt><br/> commands can be executed by any user.</p></li><li><tt>etc/org.apache.karaf.command.acl.jaas.cfg</tt> configuration file defines the ACL for <tt>jaas:*</tt> commands.<p> Only the users with <tt>admin</tt> role can execute <tt>jaas:update</tt> command. The other <tt>jaas:*</tt> commands can be executed by any<br/> user.</p></li><li><tt>etc/org.apache.karaf.command.acl.kar.cfg</tt> configuration file defines the ACL for <tt>kar:*</tt> commands.<p> Only the users with <tt>admin</tt> role can execute <tt>kar:install</tt> and <tt>kar:uninstall</tt> commands. The other <tt>kar:*</tt> commands<br/> can be executed by any user.</p></li><li><tt>etc/org.apache.karaf.command.acl.shell.cfg</tt> configuration file defines the ACL for <tt>shell:*</tt> and "direct" commands.<p> Only the users with <tt>admin</tt> role can execute <tt>shell:edit</tt>, <tt>shell:exec</tt>, <tt>shell:new</tt>, and <tt>shell:java
</tt> commands.<br/> The other <tt>shell:*</tt> commands can be executed by any user.</p><p>You can change these default ACLs, and add your own ACLs for additional command scopes (for instance <tt>etc/org.apache.karaf.command.acl.cluster.cfg</tt> for<br/>Apache Karaf Cellar, <tt>etc/org.apache.karaf.command.acl.camel.cfg</tt> from Apache Camel, ...).</p><p>You can fine tuned the command RBAC support by editing the <tt>karaf.secured.services</tt> property in <tt>etc/system.properties</tt>:</p><pre>
+#
+# By default, only Karaf shell commands are secured, but additional services can be
+# secured by expanding this filter
+#
+karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
+</pre></li></ul><h3 id="JMX">JMX</h3><p>Like for the console commands, you can define ACL (AccessLists) to the JMX layer.</p><p>The JMX ACL are defined in <tt>etc/jmx.acl<ObjectName>.cfg</tt> configuration file, where <tt><ObjectName></tt> is a MBean object name<br/>(for instance <tt>org.apache.karaf.bundle</tt> represents <tt>org.apache.karaf;type=Bundle</tt> MBean).</p><p>The <tt>etc/jmx.acl.cfg</tt> is the most generic configuration file and is used when no specific ones are found.<br/>It contains the "global" ACL definition.</p><p>JMX ACLs can control access using (inside a JMX MBean):</p><ul><li>the operation name regex (e.g. <tt>operation* = role</tt>)</li><li>the operation arguments value regex (e.g. <tt>operation(java.lang.String, int)[/(<a href="1-4.html">1-4</a>)?<a href="0-9]/,/.*/">0-9]/,/.*/</a> = role</tt>)</li></ul><p>By default, Apache Karaf defines the following JMX ACLs:</p><ul><li><tt>etc/jmx.acl.org.apache.karaf.bundle.cfg</tt> configuration file defines th
e ACL for the <tt>org.apache.karaf:type=bundle</tt><p> MBean. This ACL limits the <tt>setStartLevel()</tt>, <tt>start()</tt>, <tt>stop()</tt>, and <tt>update()</tt> operations for system bundles for<br/> only users with <tt>admin</tt> role. The other operations can be performed by users with the <tt>manager</tt> role.</p></li><li><tt>etc/jmx.acl.org.apache.karaf.config.cfg</tt> configuration file defines the ACL for the <tt>org.apache.karaf:type=config</tt><p> MBean. This ACL limits the change on <tt>jmx.acl*</tt>, <tt>org.apache.karaf.command.acl*</tt>, and <tt>org.apache.karaf.service.acl*</tt><br/> configuration PIDs for only users with <tt>admin</tt> role. The other operations can be performed by users with the <tt>manager</tt> role.</p></li><li><tt>etc/jmx.acl.org.apache.karaf.security.jmx.cfg</tt> configuration file defines the ACL for the <tt>org.apache.karaf:type=security,area=jmx</tt><p> MBean. This ACL limits the invocation of the <tt>canInvoke()</tt> operation for the use
rs with <tt>viewer</tt> role.</p></li><li><tt>etc/jmx.acl.osgi.compendium.cm.cfg</tt> configuration file defines the ACL for the <tt>osgi.compendium:type=cm</tt> MBean.<p> This ACL limits the changes on <tt>jmx.acl*</tt>, <tt>org.apache.karaf.command.acl*</tt>, and <tt>org.apache.karaf.service.acl*</tt><br/> configuration PIDs for only users with <tt>admin</tt> role. The other operations can be performed by users with the <tt>manager</tt> role.</p></li><li><tt>etc/jmx.acl.java.lang.Memory.cfg</tt> configuration file defines the ACL for the core JVM Memory MBean.<p> This ACL limits the invocation of the <tt>gc</tt> operation for only users with the <tt>manager</tt> role.</p></li><li><tt>etc/jmx.acl.cfg</tt> configuration file is the most generic file. The ACLs defined here are used when no other specific<p> ACLs match (by specific ACL, it's an ACL defined in another MBean specific <tt>etc/jmx.acl.*.cfg</tt> configuration file).<br/> The <tt>list*()</tt>, <tt>get*()</tt>, <tt>is*()</t
t> operations can be performed by users with the <tt>viewer</tt> role.<br/> The <tt>set*()</tt> and all other <tt>*()</tt> operations can be performed by users with the <tt>admin</tt> role.</p><h3 id="WebConsole">WebConsole</h3><p>The Apache Karaf WebConsole is not available by default. To enable it, you have to install the <tt>webconsole</tt> feature:</p><pre>
+karaf@root()> feature:install webconsole
+</pre></li></ul><p>The WebConsole doesn't support fine grained RBAC like console or JMX for now.</p><p>All users with the <tt>admin</tt> role can logon the WebConsole and perform any operations.</p><h2 id="SecurityMBean">SecurityMBean</h2><p>Apache Karaf provides a JMX MBean to check if the current user can invoke a given MBean and/or operation.</p><p>The <tt>canInvoke()</tt> operation gets the roles of the current user, and check if one the roles can invoke the MBean and/or the<br/>operation, eventually with a given argument value.</p><h3 id="Operations">Operations</h3><ul><li><tt>canInvoke(objectName)</tt> returns <tt>true</tt> if the current user can invoke the MBean with the <tt>objectName</tt>, <tt>false</tt> else.</li><li><tt>canInvoke(objectName, methodName)</tt> returns <tt>true</tt> if the current user can invoke the operation <tt>methodName</tt> on the MBean<p> with the <tt>objectName</tt>, <tt>false</tt> else.</p></li><li><tt>canInvoke(objectName, methodName, argumentType
s)</tt> returns <tt>true</tt> if the current user can invoke the operation <tt>methodName</tt><p>with the array of arguments types <tt>argumentTypes</tt> on the MBean with <tt>objectName</tt>, <tt>false</tt> else.</p></li><li><tt>canInvoke(bulkQuery)</tt> returns a tabular data containing for each operation in the <tt>bulkQuery</tt> tabular data if <tt>canInvoke</tt><p>is <tt>true</tt> or <tt>false</tt>.</p><h2 id="Securityproviders">Security providers</h2><p>Some applications require specific security providers to be available, such as <a href="http://www.bouncycastle.org">BouncyCastle</a>.</p><p>The JVM imposes some restrictions about the use of such jars: they have to be signed and be available on the boot classpath.</p><p>One way to deploy those providers is to put them in the JRE folder at <tt>$JAVA_HOME/jre/lib/ext</tt> and modify the security<br/>policy configuration (<tt>$JAVA_HOME/jre/lib/security/java.security</tt>) in order to register such providers.</p><p>While this app
roach works fine, it has a global effect and requires you to configure all your servers accordingly.</p><p>Apache Karaf offers a simple way to configure additional security providers:</p></li><li>put your provider jar in <tt>lib/ext</tt></li><li>modify the <tt>etc/config.properties</tt> configuration file to add the following property</li></ul><pre>
org.apache.karaf.security.providers = xxx,yyy
-</pre><p>The value of this property is a comma separated list of the provider class names to register.<br/>For example:</p><pre>
+</pre><p>The value of this property is a comma separated list of the provider class names to register.</p><p>For instance, to add the bouncycastle security provider, you define:</p><pre>
org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
-</pre><p>In addition, you may want to provide access to the classes from those providers from the system bundle so that all bundles can access those. It can be done by modifying the <tt>org.osgi.framework.bootdelegation</tt> property in the same configuration file:</p><pre>
+</pre><p>In addition, you may want to provide access to the classes from those providers from the system bundle so that all bundles<br/>can access those.</p><p>It can be done by modifying the <tt>org.osgi.framework.bootdelegation</tt> property in the same configuration file:</p><pre>
org.osgi.framework.bootdelegation = ...,org.bouncycastle*
</pre>
</div>
Modified: karaf/site/production/manual/latest/users-guide/start-stop.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/start-stop.html?rev=1553356&r1=1553355&r2=1553356&view=diff
==============================================================================
--- karaf/site/production/manual/latest/users-guide/start-stop.html (original)
+++ karaf/site/production/manual/latest/users-guide/start-stop.html Wed Dec 25 06:31:51 2013
@@ -8,7 +8,7 @@
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
<title>
- Apache Karaf 3.0.0-SNAPSHOT Guides
+ Apache Karaf 3.0.1-SNAPSHOT Guides
</title>
</head>
<body>
@@ -93,7 +93,7 @@
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
- <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><li><a hre
f="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.html">Developer Com
mands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-
guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a
href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command
s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a
href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
</div>
</div>
</div>
@@ -101,35 +101,199 @@
</td>
<td height="100%" width="100%">
<div class="wiki-content">
-<h1 id="StartingandStoppingKaraf">Starting and Stopping Karaf</h1><p>This chapter describes how to start and stop Apache Karaf from the command line as well as from the Karaf console.</p><h2 id="StartingKaraf">Starting Karaf</h2><h3 id="OnWindows">On Windows</h3><p>From a console window, change to the installation directory and run <tt>Karaf</tt>. For the binary distribution, go to</p><pre>
-cd [karaf_install_dir]
-</pre><p>where <tt>karaf_install_dir</tt> is the directory in which Karaf was installed, e.g., <tt>c:\Program Files\apache-karaf-x.y</tt>.</p><p>Then type:</p><pre>
-bin\karaf.bat
-</pre><h3 id="OnUnix">On Unix</h3><p>From a command shell, change to the installation directory and run <tt>Karaf</tt>. For the binary distribution, go to</p><pre>
-cd [karaf_install_dir]
-</pre><p>where <tt>karaf_install_dir</tt> is the directory in which Karaf was installed, e.g., <tt>/usr/local/apache-karaf-x.y</tt>.</p><p>Then type:</p><pre>
+<h1 id="Startstoprestartconnect">Start, stop, restart, connect</h1><h2 id="Start">Start</h2><p>Apache Karaf supports different start mode:</p><ul><li>the "regular" mode starts Apache Karaf in foreground, including the shell console.</li><li>the "server" mode starts Apache Karaf in foreground, without the shell console.</li><li>the "background" mode starts Apache Karaf in background.</li></ul><p>You can also manage Apache Karaf as a system service (see <a href="wrapper.html">System Service</a> section of this manual).</p><h3 id="Regularmode">Regular mode</h3><p>The regular mode uses the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows). It's the default start process.</p><p>It starts Apache Karaf as a foreground process, and displays the shell console.</p><p>On Unix:</p><pre>
bin/karaf
-</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause karaf to terminate.</p></div><h2 id="StartingKarafwithoutconsole">Starting Karaf without console</h2><p>Karaf can be started without the console if you don't intend to use it (one can always connect using the remote ssh access) using the following command:</p><pre>
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><h3 id="Servermode">Server mode</h3><p>The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.</p><p>To use this mode, you use the <tt>server</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf server
+
+</pre><p>On Windows:</p><pre>
bin\karaf.bat server
-</pre><p>or, on Unix:</p><pre>
-bin\karaf server
-</pre><h2 id="StartingKarafinthebackground">Starting Karaf in the background</h2><p>Karaf can be easily started as a background process using the following command:</p><pre>
+
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Backgroundmode">Background mode</h3><p>The background mode starts Apache Karaf as a background process.</p><p>To start in background mode, you have to use <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/start
+</pre><p>On Windows:</p><pre>
bin\start.bat
-</pre><p>or, on Unix:</p><pre>
-bin\start
-</pre><h2 id="StartingKaraffromclean">Starting Karaf from clean</h2><p>Karaf can be reset to a clean state by simply deleting the <tt>data</tt> folder.<br/>For convenience, a parameter on the <tt>karaf</tt> and <tt>start</tt> scripts is available:</p><pre>
+</pre><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Cleanstart">Clean start</h3><p>Apache Karaf stores all previously applications installed and changes that you did in the data folder.</p><p>If you want to start from a clean state, you can remove the data folder.</p><p>For convenience, you can use the <tt>clean</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf clean
+</pre><pre>
bin/start clean
-</pre><h2 id="StoppingKaraf">Stopping Karaf</h2><p>For both Windows and Unix installations, you can perform a clean shutdown of Karaf by using the following command when inside a Karaf console:</p><pre>
-system:shutdown
-</pre><p>The shutdown command has several options you can use to change the behaviour. See <a href="commands/shutdown.html">commands/shutdown</a>.</p><p>It's also possible to delay the shutdown using the time argument. The time argument can have different formats. First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes to wait. The work now is an alias for +0.</p><p>The following command will shutdown Karaf at 10:35am:</p><pre>
-system:shutdown 10:35
-</pre><p>The following command will shutdown Karaf in 10 minutes:</p><pre>
-system:shutdown +10
-</pre><p>If you're running from the main console, exiting the shell using <tt>logout</tt> or <tt>Ctrl+D</tt> will also terminate the Karaf instance.</p><p>From a command shell, you can run the following command:</p><pre>
-bin\stop.bat
-</pre><p>or, on Unix:</p><pre>
-bin/stop
-</pre>
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat clean
+</pre><pre>
+bin\start.bat clean
+</pre><h3 id="Customizevariables">Customize variables</h3><p>Apache Karaf accepts environment variables:</p><ul><li><tt>JAVA_MIN_MEM</tt>: minimum memory for the JVM (default is 128M).</li><li><tt>JAVA_MAX_MEM</tt>: maximum memory for the JVM (default is 512M).</li><li><tt>JAVA_PERM_MEM</tt>: minimum perm memory for the JVM (default is JVM default value).</li><li><tt>JAVA_MAX_PERM_MEM</tt>: maximum perm memory for the JVM (default is JVM default value).</li><li><tt>KARAF_HOME</tt>: the location of your Apache Karaf installation (default is found depending where you launch the startup script).</li><li><tt>KARAF_BASE</tt>: the location of your Apache Karaf base (default is <tt>KARAF_HOME</tt>).</li><li><tt>KARAF_DATA</tt>: the location of your Apache Karaf data folder (default is <tt>KARAF_BASE/data</tt>).</li><li><tt>KARAF_ETC</tt>: the location of your Apache Karaf etc folder (default is <tt>KARAF_BASE/etc</tt>).</li><li><tt>KARAF_OPTS</tt>: extra arguments passed to the Java comman
d line (default is null).</li><li><tt>KARAF_DEBUG</tt>: if 'true', enable the debug mode (default is null). If debug mode is enabled, Karaf starts a JDWP socket on port 5005. You can plug your IDE to define breakpoints, and run step by step.</li></ul><p>You can define these environment variables in <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows).</p><p>For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:</p><p>On Unix:</p><pre>
+# Content of bin/setenv
+export JAVA_MIN_MEM=256M
+exoprt JAVA_MAX_MEM=1024M
+</pre><p>On Windows:</p><pre>
+rem Content of bin\setenv.bat
+set JAVA_MIN_MEM=256M
+set JAVA_MAX_MEM=1024M
+</pre><h3 id="Connect">Connect</h3><p>Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.<br/>This connection can be local or remote. It means that you can access to Karaf console remotely.</p><p>To connect to the console, you can use the <tt>bin/client</tt> Unix script (<tt>bin\client.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/client
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\client.bat
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>By default, <tt>client</tt> tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).</p><p><tt>client</tt> accepts different options to let you connect on a remote Apache Karaf instance. You can use <tt>--help</tt> to get details about the options:</p><p>On Unix:</p><pre>
+bin/client --help
+Apache Karaf client
+ -a [port] specify the port to connect to
+ -h [host] specify the host to connect to
+ -u [user] specify the user name
+ --help shows this help message
+ -v raise verbosity
+ -r [attempts] retry connection establishment (up to attempts times)
+ -d [delay] intra-retry delay (defaults to 2 seconds)
+ -b batch mode, specify multiple commands via standard input
+ -f [file] read commands from the specified file
+ [commands] commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>On Windows:</p><pre>
+bin\client.bat --help
+Apache Karaf client
+ -a [port] specify the port to connect to
+ -h [host] specify the host to connect to
+ -u [user] specify the user name
+ --help shows this help message
+ -v raise verbosity
+ -r [attempts] retry connection establishment (up to attempts times)
+ -d [delay] intra-retry delay (defaults to 2 seconds)
+ -b batch mode, specify multiple commands via standard input
+ -f [file] read commands from the specified file
+ [commands] commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>Actually, <tt>client</tt> is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.</p><p>For instance, on Unix, you can do:</p><pre>
+ssh karaf@localhost -p 8101
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><h2 id="Stop">Stop</h2><p>When you start Apache Karaf in regular mode, the <tt>logout</tt> command or CTRL-D key binding logout from the console and shutdown Apache Karaf.</p><p>When you start Apache Karaf in background mode (with the <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows)), you can use the <tt>bin/stop</tt> Unix script (<tt>bin\stop.bat</tt> on Windows).</p><p>More generally, you can use the <tt>shutdown</tt> command (on the Apache Karaf console) that work in any case.</p><p>The <tt>shutdown</tt> command is very similar to the the <tt>shutdown</tt> Unix command.</p><p>To shutdown Apache Karaf now, you can simple using <tt>shutdown</tt>:</p><pre>
+karaf@root()> shutdown -h
+Confirm: halt instance root (yes/no):
+</pre><p>The <tt>shutdown</tt> command asks for a confirmation. If you want to bypass the confirmation step, you can use the <tt>-f</tt> (<tt>--force</tt>) option:</p><pre>
+karaf@root()> shutdown -f
+</pre><p>You can also use directly <tt>halt</tt> which is an alias to <tt>shutdown -f -h</tt>.</p><p>The <tt>shutdown</tt> command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.</p><p>The time argument can have different formats. First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour<br/>(in two digits). Second, it can be in the format +m, in which m is the number of minutes to wait. The word <tt>now</tt> is an alias for +0.</p><p>For instance, the following command will shutdown Apache Karaf at 10:35am:</p><pre>
+karaf@root()> system:shutdown 10:35
+</pre><p>Another example to shutdown Apache Karaf in 10 minutes:</p><pre>
+karaf@root()> system:shutdown +10
+</pre><p>Like for other commands, you can find details on the <tt>shutdown</tt> command man page:</p><pre>
+karaf@root()> shutdown --help
+DESCRIPTION
+ system:shutdown
+
+ Shutdown Karaf.
+
+SYNTAX
+ system:shutdown [options] [time]
+
+ARGUMENTS
+ time
+ Shutdown after a specified delay. The time argument can have different formats. First, it can be an abolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes to
+ wait. The word now is an alias for +0.
+
+OPTIONS
+ -c, --clean, --clean-all, -ca
+ Force a clean restart by deleting the data directory
+ -f, --force
+ Force the shutdown without confirmation message.
+ -h, --halt
+ Halt the Karaf container.
+ --help
+ Display this help message
+ -cc, --clean-cache, -cc
+ Force a clean restart by deleting the cache directory
+ -r, --reboot
+ Reboot the Karaf container.
+</pre><h2 id="Status">Status</h2><p>When you start Apache Karaf in background mode, you may want to check the current status.</p><p>To do so, you can use the <tt>bin/status</tt> Unix script (<tt>bin\status.bat</tt> on Windows).</p><p>NB: the script returns 0 exit code if Apache Karaf is running, 1 exit code else.</p><p>On Unix:</p><pre>
+bin/status
+Not Running ...
+</pre><pre>
+bin/status
+Running ...
+</pre><p>On Windows:</p><pre>
+bin\status.bat
+Not Running ...
+</pre><pre>
+bin\status.bat
+Running ...
+</pre><h2 id="Restart">Restart</h2><p>The <tt>shutdown</tt> command accepts the <tt>-r</tt> (<tt>--restart</tt>) option to restart Apache Karaf:</p><pre>
+karaf@root()> system:shutdown -r
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>This command does not start a new JVM. It simply restarts the OSGi framework.</p></div><h2 id="SystemMBean">SystemMBean</h2><p>Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.</p><p>The SystemMBean object name is <tt>org.apache.karaf:type=system</tt>.</p><p>The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:</p><ul><li><tt>reboot()</tt> reboots Apache Karaf now (without cleaning the cache)</li><li><tt>reboot(time)</tt> reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the <tt>shutdown</tt> command.</li><li><tt>rebootCleanCache(time)</tt> reboots Apache Karaf at a given time, including the cleanup of the cache.</li><li><tt>rebootCleanAll(time)</tt> reboots Apache Karaf at
a given time, including the cleanup of the whole data folder.</li><li><tt>halt()</tt> shutdown Apache Karaf now.</li><li><tt>halt(time)</tt> shutdown Apache Karaf at a given time. The time format is the same as the time argument of the <tt>shutdown</tt> command.</li></ul>
</div>
</td>
</tr>
Added: karaf/site/production/manual/latest/users-guide/tuning.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/tuning.html?rev=1553356&view=auto
==============================================================================
--- karaf/site/production/manual/latest/users-guide/tuning.html (added)
+++ karaf/site/production/manual/latest/users-guide/tuning.html Wed Dec 25 06:31:51 2013
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="description" content="description goes here"/>
+ <meta name="keywords" content="keywords,goes,here"/>
+ <meta name="author" content="The Apache Karaf Team"/>
+ <link href="../css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
+ <title>
+ Apache Karaf 3.0.1-SNAPSHOT Guides
+ </title>
+ </head>
+ <body>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr width="100%">
+ <td id="cell-0-0" colspan="2">
+
+ </td>
+ <td id="cell-0-1">
+
+ </td>
+ <td id="cell-0-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-1-0">
+
+ </td>
+ <td id="cell-1-1">
+
+ </td>
+ <td id="cell-1-2">
+ <div style="padding: 5px;">
+ <div id="banner">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align="left" class="topbardiv" nowrap="">
+<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
+ <img border="0" src="../images/karaf-logo.png" width="400px"></img>
+</a>
+ </td>
+ <td align="right" nowrap="">
+<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
+ <img border="0" src="../images/asf-logo.png">
+</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="top-menu">
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <div align="left"></div>
+ </td>
+ <td>
+ <div align="right">
+ <p>
+<a href="../index.html" title="Home">Home</a>
+|
+<a href="index.html" title="Users Guide">Users Guide</a>
+|
+<a href="../developers-guide/index.html" title="Developers Guide">Developers Guide</a>
+</p>
+
+
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td id="cell-1-3">
+
+ </td>
+ <td id="cell-1-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-2-0" colspan="2">
+
+ </td>
+ <td id="cell-2-1">
+ <table>
+ <tr height="100%" valign="top">
+ <td height="100%">
+ <div id="wrapper-menu-page-right">
+ <div id="wrapper-menu-page-top">
+ <div id="wrapper-menu-page-bottom">
+ <div id="menu-page">
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a
href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command
s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a
href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td height="100%" width="100%">
+ <div class="wiki-content">
+<h1 id="Tuning">Tuning</h1><h2 id="GarbageCollection">Garbage Collection</h2><p>Like any Java applications, Apache Karaf uses a JVM. An important feature of the JVM is the Garbage Collector.</p><p>Apache Karaf default configuration is sized for small to medium needs and to work on most machine.</p><p>That's why this default configuration may appear like "small".</p><p>By default, Apache Karaf uses:</p><ul><li><tt>-Xms128M</tt></li><li><tt>-Xmx512M</tt></li><li><tt>-XX:+UnlockDiagnosticVMOptions</tt></li><li><tt>-XX:+UnsyncloadClass</tt></li></ul><p>On Sun/Oracle JVM:</p><ul><li>the Perm size is the JVM default</li></ul><p>On IBM JVM and AIX system:</p><ul><li><tt>-Xverify:none</tt></li><li><tt>-Xdump:heap</tt></li><li><tt>-Xlp</tt></li></ul><p>For any container, it's always difficult to predict the usage of the resources and the behaviour of the artifacts deployed.</p><p>Generally speaking, a good approach for tuning is to enable <tt>-verbose:gc</tt> and use tools like VisualVM to i
dentify the potentials<br/>memory leaks, and see the possible optimisation of the spaces and GC.</p><p>You can find introduction about GC here: <a href="http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html">http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html</a>.</p><h3 id="Java6">Java 6</h3><p>If you have enough resources available on the machine, a good configuration may be:</p><ul><li><tt>-server</tt></li><li><tt>-Xmx1024M</tt></li><li><tt>-XX:MaxPermSize=640M</tt></li><li><tt>-XX:+UseConcMarkSweepGC</tt></li><li><tt>-XX:+UseParNewGC</tt></li><li><tt>-XX:+CMSClassUnloadingEnabled</tt></li></ul><p>It will give more resources to Apache Karaf, and avoid some perm space saturation if you do a lot of bundles refresh.</p><p>See <a href="http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html">http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html</a> for details about Java 6 tuning.</p><h3 id="Java7">Java
7</h3><p>Java 7 introduces a new GC algorithm: the GC1.</p><p>Depending of the use cases (and usage of the heap), the new GC1 algorithm can give good performance improvements:</p><ul><li><tt>-XX:+UseG1GC</tt></li><li><tt>-XX:-UseAdaptiveSizePolicy</tt></li></ul><p>See <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html">http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html</a> for details about Java 7 GC1 tuning.</p><p>You can find a good article about Java 7 tuning here: <a href="http://java-is-the-new-c.blogspot.de/2013/07/tuning-and-benchmarking-java-7s-garbage.html">http://java-is-the-new-c.blogspot.de/2013/07/tuning-and-benchmarking-java-7s-garbage.html</a>.</p><h2 id="Threads">Threads</h2><p>In high loaded system, the number of threads can be very large.</p><h3 id="WebContainer">WebContainer</h3><p>If you use the Apache Karaf WebContainer, the Jetty connectors create threads to handle the incoming HTTP requests.</p><p>The <tt>etc/jetty.xml</tt
> configuration file allows you to tune the Jetty connector.</p><p>For instance, the following connector configuration:</p><pre>
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="host">
+ <Property name="jetty.host" />
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="8181" />
+ </Set>
+ <Set name="maxIdleTime">300000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">20000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+</pre><p>defines the following properties:</p><ul><li><tt>maxIdleTime</tt> is the maximum inactivity time for a connection.</li><li><tt>lowResourcesConnections</tt> defines the number of connections. If the current number of connections is greater than<p> this value, the status is "low on resources". In that case, a new connection timeout is applied: the <tt>lowResourceMaxIdleTime</tt>.</p></li><li><tt>Acceptors</tt> defines the number of threads for incoming connections.</li></ul><h3 id="ApacheCamel">Apache Camel</h3><p>For instance, if you use Apache Camel inside Apache Karaf, Camel components can create a lot of threads.</p><p>Apache Camel use the notion of <tt>threadPoolProfile</tt> to control the threads creation.</p><p>For instance, the following Camel configuration defines a pool creation strategy:</p><pre>
+<threadPoolProfile id="defaultThreadPoolProfile" defaultProfile="true"
+ poolSize="10" maxPoolSize="20" maxQueueSize="1000"
+ rejectedPolicy="CallerRuns"/>
+</pre><p>See the <a href="http://camel.apache.org">Apache Camel website</a> for details.</p><h3 id="ApacheCXF">Apache CXF</h3><p>Apache CXF uses workqueues to handle server request/response.</p><p>You may see a <tt>etc/org.apache.cxf.workqueues-default.cfg</tt> configuration file. It's the default configuration applied<br/>to all workqueues (a workqueue can be associated to a specific endpoint).</p><p>On a workqueue, you can define the following properties about the threads:</p><ul><li><tt>org.apache.cxf.workqueue.default.highWaterMark</tt> defines the maximum number of threads.</li><li><tt>org.apache.cxf.workqueue.default.lowWaterMark</tt> defines the minimum number of threads.</li><li><tt>org.apache.cxf.workqueue.default.initialSize</tt> defines the initial number of threads.</li></ul><p>See the <a href="http://cxf.apache.org">Apache CXF website</a> for details.</p><h2 id="Systempackages">System packages</h2><p>The <tt>etc/jre.properties</tt> defines the packages directly provided
by the JVM.</p><p>Most of the time, the default configuration in Apache Karaf is fine and works in most of the use cases.</p><p>However, some times, you may want to not use the packages provided by the JVM, but the same packages provided by a bundle.</p><p>For instance, the JAXB version provided by the JVM is "old", and you want to use new JAXB bundles.</p><p>In that case, you have to comment the packages in <tt>etc/jre.properties</tt> to avoid to be provided by the JVM and use the<br/>ones from the bundles.</p>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="cell-2-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-3-0">
+
+ </td>
+ <td id="cell-3-1">
+
+ </td>
+ <td id="cell-3-2">
+ <div id="footer">
+ <div id="site-footer">
+ © 2008-2011 The Apache Software Foundation
+ <br/>
+ Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+ </td>
+ <td id="cell-3-3">
+
+ </td>
+ <td id="cell-3-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-4-0" colspan="2">
+
+ </td>
+ <td id="cell-4-1">
+
+ </td>
+ <td id="cell-4-2" colspan="2">
+
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
\ No newline at end of file
Modified: karaf/site/production/manual/latest/users-guide/update.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/update.html?rev=1553356&r1=1553355&r2=1553356&view=diff
==============================================================================
--- karaf/site/production/manual/latest/users-guide/update.html (original)
+++ karaf/site/production/manual/latest/users-guide/update.html Wed Dec 25 06:31:51 2013
@@ -8,7 +8,7 @@
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
<title>
- Apache Karaf 3.0.0-SNAPSHOT Guides
+ Apache Karaf 3.0.1-SNAPSHOT Guides
</title>
</head>
<body>
@@ -93,7 +93,7 @@
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
- <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><li><a hre
f="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.html">Developer Com
mands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-
guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a
href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command
s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a
href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
</div>
</div>
</div>