u:p:
« prevnext »

Configuration Override

Introduction

In production eviroments with higher security needs it may be unappropriate to have the database passwords or other secure information as cleartext values in the logfiles.

VoiceObjects itself contains the possibility to use a mechanism called configuration override since VoiceObjects 9 GA.

The described classes are not part of the default VoiceObjects delivery. To not need to add them in every possible version to this article, please request your copy of files from Voxeo Support.

Resolution

Technical Description

An ConfigurationOverride class will pick up all properties files from the WEB-INF/config/configurationOverride directory. The file name is used as the name of the configuration settings which should be overridden, e.g. dbconf_repositorydb_password.properties will be used to override dbconf.repositorydb.password (.properties is removed and '_' characters are replaced by '.' characters). Then all those property files are "executed" and the specified class/method is called with the given arguments. The result is then used to override the configuration setting in the *_Configuration.xml file. After all files are processed there should be a message on the console which indicates how many settings were overridden.

How to configure?

The general configuration of the override mechanism is done in the vo.properties file:

#To override the context entries programmatically.
vo.contextmodifier=com.voiceobjects.extensions.configuration.ConfigurationModifier
vo.contextmodifier.confDir=config/configurationOverride

Those two settings specify which class should be used for overriding the configuration settings and where the property files are located. Both settings are not available /commented in a default package.

The property files have the following structure:

className=com.voiceobjects.Echo
methodName=echo
noOfArgs=1
param1=[your parameter]

The class and method name specify which class should be called and which method in this class.

Provided classes for demo and easy start

The provided class "Echo" contains 2 methods which can be used to initially test the configuration override:

  1. echo(String) - this method just returns what was passed into the class
  2. getPin() - returns "1234"

The configurationoverride.jar needs to be placed in the WEB-INF/lib folder of VoiceObjects.

Please download the example JAR here.

Was this page helpful?  
Last edited by:kschmitte on: 9/27/2009 2:15 PM (EDT)

Tags:
Edit  | Tags | Files | Info | Options | Subscribe |


©2002-2012 Voxeo Corporation  -  VoiceXML Hosting  -  VoiceXML Servers  -  Site Map  -  Terms of Use  -  Privacy Policy  -  Covered by U.S. Patent No. 6,922,411