Skip to main content
Previous sectionNext section

Example Two: Zen

In this example you experiment with Unauthenticated, Password, and Cascading authentication using a Zen application. Note that the steps for setting the authentication mechanisms for a non-Zen CSP application are identical to the steps shown in the example.

To get started we first need to load the example Zen application into Caché. Please load it into the USER namespace. See the note below for instructions. The application consists of four classes:

  1. SecurityTutorial.Application — The Zen application definition.

  2. SecurityTutorial.HomePage — The Zen page that we will be providing security for.

  3. SecurityTutorial.LogIn — The custom log in page for the application.

  4. SecurityTutorial.CreateDelegatedUsers — A Zen page for creating “delegated users” in Caché. This page is used in a later example in the tutorial.

Now configure the application to use Unauthenticated access:

  1. Open the Web Applications page of the portal (click [Home] > [System Administration] > [Security] > [Web Applications]).

  2. Click Edit for the /csp/user application.

  3. For Allowed Authentication Methods click Unauthenticated. Verify that no other authentication mechanism is selected. Click Save.

    generated description: webapp unauth 20142

Next, open SecurityTutorial.HomePage in a Web browser:

  1. Open SecurityTutorial.HomePage in Studio.

  2. Close any browsers that you have open, so we know they won't be able to cache any security information. On the Studio Menu Bar click View–>Web Page.

  3. The page opens in your default Web browser:

    generated description: csphome unauth 20111

    Since we selected Unauthenticated for the authentication mechanism, we access the page through the UnknownUser account.

Note:

Close your browser before moving on to the next Web-based example. Depending on its settings, the browser might cache security information, which is likely to interfere with the next example.

Note:

The application is in install-dir\Dev\tutorials\security\Zen_Authenticate.xml. In a standard Caché installation, install-dir is in C:\InterSystems\Cache. Import the application files using Terminal. Importing Code Using Terminal contains instructions. This example assumes that you have installed Caché using minimal security.