For testing apps protected with header-based authentication
1.6K
This app is used to emulate apps that use header-based authentication for Single Sign-On (SSO) integrations.
If you integrated or changed code of an app to support SSO using headers variables, you probably ran thru a bunch of issues like:
With this sample, you can test the integration before running thru these issues, simplifying your integration and helping with troubleshooting.
The sample app currently supports:
To navigate thru the samples, use the menu on the top-right corner:

You have 4 options:
Just click https://on-prem.herokuapp.com
In case you want to run your own dedicated instance over the internet.
Just click this button, follow the instructions:
After deployment, your app will be available at https://<your-domain>.herokuapp.com.
In case you want to test from your intranet (and you have Docker in your server).
From a computer with Docker, launch a terminal and enter the following:
docker pull fhakamine/header-app-tester
docker run -p 3000:3000 -d fhakamine/header-app-tester
After deployment, your app will be available at https://localhost:3000.
By the way, For more info about the Docker repo for this app, click any of these links 🙂 :
The good ol just run straight from your machine (if you have Node.js installed)
Clone this repo and run like any other Node.js project:
git clone https://github.com/sudobinbash/header-app-tester.git
cd header-app-tester
npm install
node start.js
After deployment, your app will be available at https://localhost:3000.
Extend routes/index.js with a new route for your app:
router.use('/webseal', require('./webseal'));
Create a file for your route by copying the sample file to webseal.js :
cd routes
cp sample_app.js webseal.js
Edit your route (i.e. routes/webseal.js) file on the following sections:
Headers: Update the attributes constant with each header name and description expected by the sample app. For example:
const attributes = [
{"id":"iv-user","description":"User id sent by WebSeal to backend apps. It can be a generic user id or an email"},
{"id":"iv-groups","description":"User groups separated by comma (,) and quoted )(i.e. \"admin\",\"end-user\"). typically from an LDAP or AD store"},
];
Metadata: Update the title, description, and doc constant with the application metadata. For example:
const title = 'IBM WebSeal';
const description = 'WebSEAL is a reverse-proxy from IBM that enforces SSO and authorization integrated to IBM Tivoli Access Manager or IBM ISAM. Applications integrated thru WebSeal typically use the same header variables.';
const doc = 'https://www.ibm.com/support/knowledgecenter/en/SSPREK_7.0.0/com.ibm.isam.doc_80/ameb_webplugin_guide/concept/con_sso_plugin_ws.html';
URLs: Update the urls constant with each uri and description expected by the sample app. For example:
const urls = new Map([['/', 'Index'],['/public', 'Public'],['/private', 'Private'],['/admin', 'Admin']]);
Header validation: Update the router path with the header validations to be executed. The header validation (i.e. header('oam_remote_user').not().isEmpty().isEmail(),) is executed using express-validator (examples of validation and sanitization here: https://express-validator.github.io/docs/sanitization.html).
router.get(Array.from(urls.keys()),[
header('iv-user').not().isEmpty(),
header('iv-groups').not().isEmpty(),
Content type
Image
Digest
Size
342.6 MB
Last updated
over 6 years ago
docker pull fhakamine/header-app-tester