SSO step by step implementation guide
This is example step by step guide to setup sso configuration on system.
Create entry jsp file
Copy dashboard.jsp or viewer.jsp to sso entry url : For example, copy files with sso_dashboard.jsp sso_viewer.jsp
Entry jsp file modifications
Modify sso_{entry}.jsp file with the following changes
Add sso loading module. This module is for replacing login input to waiting message.
var modules = ["framework", "vis_ec", "vis_ec_theme", "app_viewer", "appnc", "custom_viewer", "custom", "sso"];
IG$.__microloader(modules);
Modify SSO javascript
Open and edit /amplix/webapps/launcher/custom/sso_client.js
var fkey = "sso_sim_b6118e61573e4aaa_key_map:";
if (IG$.sessionUtils)
{
var sess = IG$.dlgLogin;
sess.getKeyPair(fkey, "", progress, window.m$mts,
// login error handler
new IG$.callBackObj(this, function(xdoc) {
// move to portal login page if necessary
sform.fadeOut();
progress.hide();
mc.fadeIn();
})
, "dbsync");
}
sso_sim_b6118e61573e4aaa_key_map key value is send to server as security token. On the dynamic module below, the authentication module should aware this key value to distinguish normal user login and sso purpose authentication.
dbsync need to be changed with you system config registered single sign on module short name.
Building SSO logic
System management menu have UI to build and compile single sign on logic without DBA or system administrator's attention. With Java based program and your sytem is ready to service to clients.
From left main menu, select Management -> System Config
Click top right SSO Designer to build dynamic logic.
Add new logic and the example code is as follows
sso_sim_b6118e61573e4aaa_key_map
is the validation key defined on sso_client.js.
if (userid != null && userid.startsWith("sso_sim_b6118e61573e4aaa_key_map:") == true)
{
this.setSecProp(iprop);
String mts = "0122483f-0155fb46";
//Object _osess = session.getAttribute("__sso_info"); //-- session
Object _osess = session.getAttribute("__sso_info");
if (_osess != null)
{
String t = _osess.toString();
logger.info(t);
String muserid = t.substring(t.indexOf(":") + 1);
logger.info(">> login with ID : " + muserid);
uid = getRegisteredUserUUID(mts, muserid);
}
}
Click on Apply code button before compile. Check the compile result should be success!