OSCARS Configuration
You will need to modify
the files that are located in conf/examples/server,client for your
users. Once you have modified them you should copy them to a domain
specific directory, and set the environment variable DOMAIN_HOME to
point to them. If $DOMAIN_HOME is set, the ant task setupServer will
copy the files from there rather than the conf/examples. Also when you
update to a newer distribution of OSCARS your changes won't be lost.
Server
- services.xml
is generated by WSDL2Java and specifies all the methods and their
parameters.
The security inFlow and outFlow parameters have been added to this
file. The name of the sec-properties file is given here. Located
in the distribution at conf/server. Copied to OSCARS.aar/META-INF/.
- sec-server.properties
names the keystore file and has its
password. Located in the distribution in conf/examples/server. Copied
to $CATALINA_HOME/shared/server/classes.
- sec-server.jks
has
the keystore that is used by rampart to
verify signed messages. It only needs to contain the trustedCaCerts for
the issuers of any user who will submit a signed message. Located in
the distribution in conf/examples/server. Copied to
$CATALINA_HOME/shared/server/classes.
- Files copied from OSCARS to axis2
- conf/server/axis2.log4j.properties is copied to
webapps/axis2/classes/log4j.properties
- classes/net/es/oscars/client/security/PWCallback.class copied
to webapps/axis2/WEB-INF/net/es/oscars/client/security/PWCallback.class
When the server forwards a request to another domain, it acts as a
OSCARS/axis2 client and thus needs to include te client-side
configuration files. These files are put into
$CATALINA_HOME/shared/classes/repo.
The location of the axis2.xml file and the repository in which the
modules are found are set in Forwarder.setup. Forwarder.setup calls
KeyMangement.setKeyStore which sets the ssl keystore to the
file "ssl-keystore.jks" in the repository directory.
axis2.xml defines the names of the signatureProperty file and the
keystore.
The files sec-client.properties, sec-client.jks and ssl-keystore.jks
are also
copied to $CATALINA_HOME/shared/classes/repo so that they will be on
the server's classpath.
Client
See Security
Reference for more
details about these files.
- axis2.xml - needed when
signing messages. It contains:
- InFlow and OutFlow parameters
- Name of the client-properties file
The axis2.xml file can be found by the client code from a
javavm flag -daxis2.xml=<filename>
or can be set programatically by
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo, null);
ServiceClient serviceClient = new ServiceClient(configContext, null)
Where repo is a directory on the classpath that contains a
conf/axis2.xml file.
The repo directory also contains: sec-client.properties
contains:
- org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
- org.apache.ws.security.crypto.merlin.keystore.type=jks
- org.apache.ws.security.crypto.merlin.keystore.password=password
- .apache.ws.security.crypto.merlin.file=sec-client.jks (name
of keystore file)
sec-client-key.jks
contains
- keyentry for the user specified in axis2.xml to be signing
the outgoing messages
- trustedCaCerts for the issuer of this user's certificate
ssl-keystore.jks - has
the certificate and issuer for the ssl
certificate of the oscars services to which the client will be
connecting