Security

Most of the examples can be run using the security features of TIBCO ActiveSpaces. To help you get started, an example security policy file and security token file can be found in the /security subdirectory of the examples for each language API.

For detailed information on the ActiveSpaces security features, see Implementing ActiveSpaces Security.

To run an example with security applied to it, you must first start up a security domain controller for the metaspace the example will use. You can use as-agent as a security domain controller.

To run as-agent as a security domain controller using the example security policy file, change to the example directory that contains example_policy.txt and invoke as-agent as follows:

Java Invocation java [-d64] -jar AS_HOME/lib/as-agent.jar -security_policy example_policy.txt -discovery tcp://127.0.0.1:50000 -listen tcp://127.0.0.1:50000
C Invocation AS_HOME/bin/as-agent.exe -security_policy example_policy.txt 
-discovery tcp://127.0.0.1:50000 -listen tcp://127.0.0.1:50000
.NET Invocation AS_HOME\bin\Agent.NET.exe -security_policy example_policy.txt
-discovery tcp://127.0.0.1:50000 -listen tcp://127.0.0.1:50000

These commands start up as-agent using the default metaspace name of ms. When security is used, the TCP transport must be used. So we have used the loopback IP address of tcp://127.0.0.1 and a port of 50000 for both the discovery and listen URLs. This will keep the network connections on your local machine.

If you need to change the metaspace name or discovery URL, you will also need to modify the metaspace name or discovery URL in the metaspace_access entry in the example security policy file and regenerate the example security token file.

To see how to use the security API to code a security domain controller, see ASDomainController.

Once you have started a security domain controller, to apply security to most of the examples you just need to add the following command line option when starting the example:

-security_token exdomain_token.txt

Refer to the section for each example to see whether security can be applied to it.

The following sections explain how the example security policy file and security token file were create d and which security features are enabled when you use them.