Documentation
 
Installation
 
Setup guide
 
  Service settings
Advanced setups
 
  SSL Setup
  Filters
  Scripts
Schemas docs
 
Other
 
  Security
 
  Built with Apache Forrest logo Financial help logo
 
Designed for Firefox logo Java.net member logo
 


by SuperBonBon  PDF 

System settings



Configuration files.  > Service_config.xml configuration file.  > Admin console user access.  > Next step 

Configuration files.

Currently some configuration change requires a modification of the configuration files. The adminstration console let you manage most of the deployed servers settings but unfortunatly no service settings can be managed at this time. All configuration files can be edited with your favorite text editor such as notepad or vi. All files are in XML format, so you'll need to respect syntax rules when you edit config files. You can take a look at the small XML guide for more information about it.

Note
All relative file paths defined in the configuration files are relative to the JAFS bin directory.

JAFS uses 2 distinct XML grammars to be configured:

You can find the service_config.xml and server_sample.xml files in the JAFS config installation directory for a "live" example of those XML grammars.

Note
All configuration changes in the service configuration file require a restart of the application.

The need to restart the software after every changes in the service configuration file as well as the lack of interface to manage these settings are the next concerns that will be adressed.

Service_config.xml configuration file.

This configuration file is used for generic settings, here is a list of the settings that you will surely want to change :

  • name or fw-host-name : The name of your host ( or firewall IP ), this name will be used to determine your server IP.
  • dyn-ip-check-time : Servers using a dynamic IP should make sure to enable this setting so that FTP servers work correctly when the IP address changes. The DynDns client can be added here.
  • management : You will surely want to change the default server connectors settings such as default HTTP console port, UPNP use for WAN access, language and manage-session settings.

Here is a small example of the settings in the configuration file that we have described above :

      
      <jafs-service xmlns="http://www.sbbi.net/jafs/1.0/jafs-service" ... >
        <network-interfaces>
          <network-interface id="default" default="true" name="eth0" 
                             fw-host-name="myfirewall.mycomp.com" dyn-ip-check-time="10">
            <!-- UPNP support for automatic NAT mappings -->
            <fw-nat-ports-mapper class-name="net.sbbi.jafs.nat.UPNPNatPortsMapper" 
                                 mappings-monitoring-time="10">
            </fw-nat-ports-mapper>
            <!-- dyndns.org client, called as soon as external ip changes -->
            <dynamic-dns-client id="DynDNSClient" 
                                class-name="net.sbbi.jafs.dyndns.DynDnsOrgClient">
              <setting name="hostName">test.dyndns.org</setting>
              <setting name="backupMx">false</setting>
              <setting name="offline">false</setting>
              <setting name="password">testPassword</setting>
              <setting name="userName">testUser</setting>
              <setting name="wildCard">false</setting>
            </dynamic-dns-client>
          </network-interface>
          <!-- you can defined multiple network interfaces -->
          <network-interface id="dialupModem" name="ppp0">
            <!-- identifier for you good old dialup modem -->
          </network-interface>
        </network-interfaces>
        ...
        <management locale="en_US" manage-session="true" plug-to-server="false">
          <adapter name="MX4J HTTP Adapter" class-name="net.sbbi.jafs.management.MX4JHttpConsole">
            <setting name="port">9090</setting>
            <setting name="allowedUser">administrator,test</setting>
            <setting name="locale">en_US</setting>
            <setting name="JAASRealm">xml<setting>
            <setting name="securityProtocol">TLS</setting>
            <setting name="ni">default</setting>
            <setting name="useCache">true</setting>
            ...
          </adapter>
          ...
        </management>
        ...
      </jafs-service>
      
      

All the other settings are not really important for a basic server usage, they are only included to help server integration.

Admin console user access.

The HTTP administration console created by the adapter net.sbbi.jafs.management.MX4JHttpConsole uses authentication realm for user access, just like ftp servers. The console is set to use the default XML based authentication realm provided with JAFS. You can change the JAASRelam setting if you have a custom realm you want to use.
You can take a look at the JMX adapters doc for a complete reference about adapters settings. To add, remove users or change user password you'll need to edit the xml_auth_realm.xml file in the config directory and add or remove users according to the file's XML grammar or use the administration console to do it :

            
      <xmlAuthRealm>
        <user name="user1" password="user1pass"/>
        <user name="user2" password="user2pass"/>
        <user name="user3" password="user3pass"/>
        ...
      </xmlAuthRealm>
      
      

Finally, change the allowedUser net.sbbi.jafs.management.MX4JHttpConsole adaptor setting and add the user names you have defined in the xml_auth_realm.xml file, use comma to delimit user names if you need to provide multiple access to the console :

      
      <jafs-service xmlns="http://www.sbbi.net/jafs/1.0/jafs-service"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation=".....">
        ...
        <management locale="en_US" manage-session="true" plug-to-server="false">
          <adapter name="MX4J HTTP Adapter" class-name="net.sbbi.jafs.management.MX4JHttpConsole">
            <setting name="port">9090</setting>
            <setting name="allowedUser">user1,user2</setting>
            <setting name="locale">en_US</setting>
            <setting name="JAASRealm">xml<setting>
            <setting name="securityProtocol">TLS</setting>
            <setting name="useCache">true</setting>
          </adapter>
          ...
        </management>
        ...
      </jafs-service>
      
      

The above example will give access to the admin console to user1 and user2 defined in the xml_auth_realm.xml file.

Next step

Once you have set your general settings, go to the next step to alter your server settings.


 

Copyright © 2005 SuperBonBon Industries. All rights reserved.
Unless otherwise expressly noted, the contents of these pages are licensed under the Creative Commons - Attribution / Share Alike license.