MyApps with external source for applications
Requirements
- PAS 3.0 or higher installed
- MyApps configured with Guided Scenario
Do the following steps in the ADVANCED tab in the Configuration GUI.
Step 1 - Add myapps.js file
The following myapps.js file has to be installed in /PhenixID/Server/src/js/ folder.
Due to that every application has to have a unique identifyer used in the new MyApps to hide the ordinary application link.
No restart of service is necessary.
Step 2 - Pipes
Add the following configuration to “Pipes”.
Change the valve for the two LDAPSearches to your environment location of users and applications.
Change the connection_ref to your LDAP source.
{
"id": "MyAppsLookupPipeAdv",
"name": "MyApps application lookup pipe",
"valves": [
{
"name": "SessionLoadValve",
"config": {
"id": "{{request.session_id}}",
"require_session": "true",
"require_auth_session": "true"
}
},
{
"name": "LDAPSearchValve",
"config": {
"connection_ref": "16298ecc-cf51-4600-883f-c8f302738077",
"base_dn": "ou=Users,o=PhenixID",
"scope": "SUB",
"size_limit": "0",
"filter_template": "(&(objectclass=person)(mail={{request.username}}))"
}
},
{
"name": "PropertyAddValve",
"config": {
"name": "type",
"value": "user"
}
},
{
"name": "LDAPSearchValve",
"config": {
"connection_ref": "16298ecc-cf51-4600-883f-c8f302738077",
"base_dn": "ou=Applications,o=PhenixID",
"scope": "SUB",
"size_limit": "0",
"allow_multiple": "true",
"filter_template": "uniqueMember={{item.id}}",
"attributes": "URL,title,category,image"
}
},
{
"name": "PropertyAddValve",
"config": {
"name": "type",
"value": "application",
"item_include_expr": "item.containsProperty('type')==false"
}
},
{
"name": "PropertyReplaceValve",
"description": "For compability to MyApps 2.x image locations",
"config": {
"source": "image",
"token": "image",
"replacement": "myapps/image"
}
},
{
"name": "ItemRemoveValve",
"config": {
"item_include_expr": "item.getPropertyValue('type').equals('user')"
}
},
{
"name": "ItemRemoveValve",
"enabled": "true",
"config": {
"item_include_expr": "item.containsProperty('session_id')"
}
},
{
"name": "ScriptEvalValve",
"enabled": "true",
"config": {
"mime_type": "application/javascript",
"script_path": "src/js/myapps.js"
}
},
{
"name": "ItemSerializerValve",
"description": "Save application items to session",
"config": {
"dest_scope": "session",
"dest_name": "applications",
"keep_items": "true"
}
},
{
"name": "PropertyRemoveValve",
"config": {
"name": "session_id"
}
},
{
"name": "SessionPersistValve",
"config": {}
}
]
},
Click to copy
Step 2 - Modules
Change action
Find the "com.phenixidentity~phenix-prism-myapps" created by the MyApps scenario.
Change the "myappsLookUpPipe" to your newly saved pipe "MyAppsLookupPipeAdv"
{
"name": "com.phenixidentity~phenix-prism-myapps",
"enabled": "false",
"prism_enabled": "true",
"config": {
"base_uri": "myapps",
"http_configuration_ref": "bdd88649-ff8d-4fd3-a2b0-27e558d462cc",
"display_name": "My Apps",
"myappsLookUpPipe": "MyAppsLookupPipeAdv",
"itemPipe": "4ab22f23-f3ea-421d-be79-fb5970d15642"
},
"guide_ref": "41993569-ebfa-4f23-b14c-f726c5de6850",
"guide_id": "guides.myapps",
"created": "2019-11-03T21:20:05.976Z",
"id": "89a1cf88-c7c1-4cfe-8448-30a1d8e0c553"
},
Click to copy