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


Chapter 5 Using the Example Code : ASUserAuthenticator

ASUserAuthenticator
Overview
When using user authentication, the default ActiveSpaces behavior of prompting users to enter their authentication information may not be adequate. Therefore, TIBCO ActiveSpaces provides a callback mechanism that allows you to customize how user authentication information is retrieved for your users.
The ASUserAuthenticator example demonstrates how to use the user authentication callback mechanism to implement your own functionality for retrieving user authentication information. However, you must first have configured the example security policy file to enable user authentication as described in User Authentication Example. After ASUserAuthenticator successfully connects to a metaspace, it loops, waiting for user input to tell it to shut down.
Starting ASUserAuthenticator
The following examples show how to invoke ASUserAuthenticator 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 exdomain_token.txt file.
Java Invocation
java security.ASUserAuthenticator -discovery tcp://127.0.0.1:50000
-security_token exdomain_token.txt
C Invocation
ASUserAuthenticator -discovery tcp://127.0.0.1:50000 -security_token exdomain_token.txt
.NET Invocation
AS_HOME/examples/dotnet/ASUserAuthenticator.exe -discovery tcp://127.0.0.1:50000 -security_token exdomain_token.txt
Using ASUserAuthenticator
Once the ASUserAuthenticator example starts, you will see the following prompts:
Enter user name and password for SystemLoginInfo
Login Domain:
Login User Name:
Login Password:
You will notice in this example that the password you enter is echoed back to you. ASUserAuthenticator is only an example and uses the input mechanisms provided by the implementation language. Various software packages are available from third-party vendors which you can use to not echo what is being input by the user.
ASUserAuthenticator connects to the default metaspace named ms. Once ASUserAuthenticator has started, it will displayed a short menu of options. The following options are allowed:
h - display command line help information
q - exit ASUserAuthenticator
User Access Control Example
User access control works in conjunction with user authentication. To get user access control to work, you first have to enable user authentication as described in the User Authentication Example.
The example security policy file example_policy.txt has a predefined user named user1 who has been configured to have the following permissions for all spaces in the default metaspace named ms:
To enable user access control for you as the user, do the following:
1.
2.
Open the file example_policy.txt with a text editor.
3.
access_control=false;default=deny
4.
access_control=true;default=deny
5.
group1 = user1
6.
Change user1 to your <domain\username>.
7.
To see how user access control works when running ASOperations with security, do the following:
1.
2.
Restart any security domain controllers, for the exdomain security domain, using the modified security policy file.
3.
Start ASOperations with security.
When ASOperations tries to connect to the metaspace, you will be prompted for your user login information. After that ASOperations will join the space. You should be able to do some puts and gets on the space and browse the space.
 

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