Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Using the Example Code : ASDomainController

ASDomainController
Overview
You can use the ASDomainController example as a security domain controller when running the rest of the ActiveSpaces examples with security. ASDomainController uses a security policy file to connect to a metaspace and become a security domain controller for the metaspace.
The ASDomainController example does not connect to any spaces or provide any functionality besides what is needed to act as a security domain controller. Once ASDomainController successfully connects to a metaspace, it loops, waiting for user input to tell it to shut down.
Starting ASDomainController
The following examples show how to invoke ASDomainController for each of the API sets. If you do not start the example from the security subdirectory of the examples, be sure to enter the full path of the example_policy.txt file.
Java Invocation
java security.ASDomainController -discovery tcp://127.0.0.1:50000 -listen
tcp://127.0.0.1:50000 -security_policy example_policy.txt
C Invocation
ASDomainController -discovery tcp://127.0.0.1:50000 -listen tcp://127.0.0.1:50000 -security_policy example_policy.txt
.NET Invocation
AS_HOME/examples/dotnet/ASDomainController.exe -discovery tcp://127.0.0.1:50000
-listen tcp://127.0.0.1:50000 -security_policy example_policy.txt
Using ASDomainController
Once the ASDomainController example starts, you can then start other examples using security. ASDomainController acts as the security domain controller for the metaspace it connects to. In the above example invocation, the default metaspace named ms is connected to by ASDomainController. To have ASDomainController act as the security domain controller for a different metaspace, use the -metaspace command line argument to specify the name of the desired metaspace.
Once ASDomainController has started, it will displayed a short menu of options. The following options are allowed:
h - display command line help information
q - exit ASDomainController
User Authentication Example
Using the example security policy file, example_policy.txt, you can easily enable user authentication using your local operating system for authentication. When user authentication is enabled, any of the examples, which are started with security using the security token file exdomain_token.txt will prompt the user for their domain name, user name and password when trying to connect to a metaspace in the 'exdomain' security domain.
To enable user authentication for use with the examples:
1.
2.
Open the file example_policy.txt with a text editor.
3.
authentication=none
4.
authentication=userpwd;source=system;service=login;
hint=SystemLoginInformation
5.
If you have only changed the user authentication setting in the security policy file, it should not be necessary to regenerate the security token file. What is entered for the hint is displayed to the user to give them an indication of which login username and password to enter.
To run an example with user authentication:
1.
2.
Restart any security domain controllers, for the exdomain security domain, using the modified security policy file.
3.
When your example tries to connect to the metaspace, you will first be asked to enter your system login domain, username, and password. If your user information cannot be authenticated against your operating system, your connection to the metaspace will be denied.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved