Enabling User Authentication

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.

Procedure

  1. Change directory to the security subdirectory of the examples.
  2. Open the file example_policy.txt with a text editor.
  3. Locate the following line:
    authentication=none
  4. Change it to the following to enable system level user authentication:
    authentication=userpwd;source=system;service=login;
hint=SystemLoginInformation
  5. Save the file.

    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.

Related concepts