Welcome

OAG Demosite

A public demonstration site. Sign in to continue to the protected area.

About

OAG Demosite is a demonstration application designed to sit behind the Okta Access Gateway (OAG). It has no login of its own. It trusts the headers the gateway adds after a user authenticates.

Pages

  • / (this page): public, no authentication required.
  • /secure/: the signed-in dashboard, for all authenticated users.
  • /admin/: the admin console, for a select set of administrators only.

Configure the gateway

  1. Publish this site as an application in OAG, using the host name demosite.oagtraining.com.
  2. Leave the root path / unprotected, so anyone can see this page.
  3. Protect /secure/ with a policy that allows all authenticated users.
  4. Protect /admin/ with a stricter policy that allows only your administrators group. The site does not check group membership itself, so the OAG policy is what keeps everyone else out.
  5. Add these headers to requests sent to the site:
    • oag_username: the user's username
    • firstname: the user's first name
    • lastname: the user's last name

How to use it

  1. Click Login (or go to /secure/). OAG asks you to sign in, then returns you to the dashboard with your name shown in the top corner.
  2. Use Admin in the top links to open /admin/. Users who are not administrators are blocked by the gateway.
  3. Select Display Header Variables at any time to see every HTTP header the site received, which confirms what OAG is passing.

If a protected page is opened without the oag_username header, it shows a "you must be logged in" message instead of its content.

Documentation