Question
JSC Sberbank of Russia - Ukraine
UA
Last activity: 21 Jul 2017 10:03 EDT
Access to PRPC Application by it's own URL
We have some applications in PRPC with its own UI. The user authentication in our PRPC is "clear" by using LDAP. We integrated PRPC’s Web UI into our Front office system in iFrame by URL like: "https://ServerName/prweb/PRServletContainerAuth". Now, we can access to Application's Portal UI by this URL only for one Application, described in User's Access Group by default.
My question is: How to make a URL with unique parameters to access the concrete application directly ?
I.e. every Application must have it's own URL. This URL must call the Portal for its Application by this unique URL.
For example: https://ServerName/prweb/PRServletContainerAuth/ApplicationName=APPLICATION001 or https://ServerName/prweb/PRServletContainerAuth/ApplicationName=APPLICATION888
Hope, my picture helps to show the idea:
We have some applications in PRPC with its own UI. The user authentication in our PRPC is "clear" by using LDAP. We integrated PRPC’s Web UI into our Front office system in iFrame by URL like: "https://ServerName/prweb/PRServletContainerAuth". Now, we can access to Application's Portal UI by this URL only for one Application, described in User's Access Group by default.
My question is: How to make a URL with unique parameters to access the concrete application directly ?
I.e. every Application must have it's own URL. This URL must call the Portal for its Application by this unique URL.
For example: https://ServerName/prweb/PRServletContainerAuth/ApplicationName=APPLICATION001 or https://ServerName/prweb/PRServletContainerAuth/ApplicationName=APPLICATION888
Hope, my picture helps to show the idea:
***Updated by moderator: Lochan to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
ai4process
UA
Hello, Suruchi.
Activity "Chaplic" is ready, it has only one step: Show-HTML with HTML stream = "chapHTML"and one parameter AGname="youAccessGroupactualName".
"chapHTML" text is:
<HTML>
<head>
<title>PRPC starting</title>
<pega:include name="SafeURLInclude"/>
<script>
function switchApp()
{
CAG = "<pega:reference name="AccessGroup.pyAccessGroup"/>"
window.alert("current = " + CAG);
var DAG = "<pega:reference name="Param.AGname"/>"
window.alert("parameter = " + DAG);
<pega:save name="NAG" ref="param.AGname"/>
NAG = "<pega:reference name="$save(NAG)"/>"
window.alert("NAG = " + NAG);
<pega:forEach name="pxRequestor.pxSecuritySnapshot.pxAvailableApps">
<pega:save name="AG" ref="$this.pxAccessGroup"/>
<pega:choose>
<pega:when test="$save(AG)==$save(NAG)">
window.alert("AG is " + "<pega:reference name="$save(NAG)"/>");
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",NAG);
window.location.href = oRedirectUrl.toURL();
</pega:when>
</pega:choose>
Hello, Suruchi.
Activity "Chaplic" is ready, it has only one step: Show-HTML with HTML stream = "chapHTML"and one parameter AGname="youAccessGroupactualName".
"chapHTML" text is:
<HTML>
<head>
<title>PRPC starting</title>
<pega:include name="SafeURLInclude"/>
<script>
function switchApp()
{
CAG = "<pega:reference name="AccessGroup.pyAccessGroup"/>"
window.alert("current = " + CAG);
var DAG = "<pega:reference name="Param.AGname"/>"
window.alert("parameter = " + DAG);
<pega:save name="NAG" ref="param.AGname"/>
NAG = "<pega:reference name="$save(NAG)"/>"
window.alert("NAG = " + NAG);
<pega:forEach name="pxRequestor.pxSecuritySnapshot.pxAvailableApps">
<pega:save name="AG" ref="$this.pxAccessGroup"/>
<pega:choose>
<pega:when test="$save(AG)==$save(NAG)">
window.alert("AG is " + "<pega:reference name="$save(NAG)"/>");
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",NAG);
window.location.href = oRedirectUrl.toURL();
</pega:when>
</pega:choose>
</pega:forEach>
}
</script>
</head>
<BODY onLoad="switchApp();">
</BODY>
</HTML>
SnapStart URL:
Best Regards,
Volodymyr Podoroga
Pegasystems Inc.
IN
Hi All,
I had a video call today with Volodmyr. He said he wants to make a iframe for every application. He wants to open every application by passing additional paramenters.He doesnot want to open any application as default url. Can anyone reply regarding this?
Pegasystems Inc.
IN
I shared two links with customer :
and told him first url may solve his problem but he said that the first link describes IAC. I know what is it. I am afraid it can’t help me in my task.
Quotation:
“Usage
In a typical Pega composite application implementation, users log in to the company portal page, which then displays the applications that they have access to…”
But the task was to automatically switch applications by parameters in URL.
- I.e. don’t call the “common” company portal page. Instead of this – call Portal Layout of concrete Application.
Can anyone help me on this ?
Pegasystems Inc.
GB
My undertanding is that normally we want to do everything possible to stop people being able to do stuff by changing the URL.
I suppose it should be possible to update the operator ID page that is created during authentication to change the default access group, but I am not sure how you would pass a parameter from the URL to the activity.
Updated: 21 Jul 2015 10:25 EDT
JSC Sberbank of Russia - Ukraine
UA
I know how to automaticaly login into PRPC by using such URL with parameters:
where parameters UserName - Operators Login Name and cnVsZXM= - the password ("rules") in BASE64.
JSC Sberbank of Russia - Ukraine
UA
It seems I found the first step of solution by myself.
I created a new Activity ("LogOnly" in "Sb-FW-CTrackFW-Work-Tracking" Class), with Log-Message method only to check if it was called (activated). Don't forget to setup May start? [v] option on "Security" tab.
Then I called this Activity by URL:
It was called successfully. I found my message in Log.
So, I think to create the same number of such Activities as the number of Applications in PRPC. Every Activity will call it's own Application. Probably by changing the default Access Group in Operator's profile ?
What do you think about this way ?
The Activity name = Application name - the parameter in URL I can easy change.
Does anybody know what will be the next step (the content of Activity for calling Application) ?
Pegasystems Inc.
IN
ÐдÑавÑÑвÑйÑе ÐладимиÑ,
Good Evening
Good to know about this . I am working on this with SME and will update/ reply on mesh post by SME/me by tomorrow.
Regards
Suruchi Gupta
JSC Sberbank of Russia - Ukraine
UA
It will be usefull to use only one Activity with parameter=ApplicationName. Maybe it's possible, but I don't know how.
Anyway, the solution with separated Activities can help. I'll also continue my investigation tomorrow.
Pegasystems Inc.
IN
ÐдÑавÑÑвÑйÑе ÐладимиÑ,
Good Evening
Just checking how your investigation is going. Did seperated activities help address your issue?
Regards
Suruchi Gupta
ai4process
UA
Hi, in PRPC this technique is called SnapStart:
"SnapStart is a desktop HTML-based interfacing technique for capturing information from an existing system, accessed from a workstation, into a PRPC application."
It seems, that solution could be find out by using SnapStart technique to change available Application during login proccess.
Changing Application cause reload client web session and change user's current access group, in other words, for available pxRequestor.pxSecuritySnapshot.pxAvailableApps choose correct AccessGroup.pyAccessGroup.
Both tasks well done in SwitchApplication.jsp, main part of that is function:
<script>
function switchApplication(accessGroup) {
if(accessGroup == null) {
accessGroup = document.getElementById('<pega:reference name="$this-Definition(pyPropertyName)"/>').value;
}
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",accessGroup);
window.location.href = oRedirectUrl.toURL();
}
</script>
Hi, in PRPC this technique is called SnapStart:
"SnapStart is a desktop HTML-based interfacing technique for capturing information from an existing system, accessed from a workstation, into a PRPC application."
It seems, that solution could be find out by using SnapStart technique to change available Application during login proccess.
Changing Application cause reload client web session and change user's current access group, in other words, for available pxRequestor.pxSecuritySnapshot.pxAvailableApps choose correct AccessGroup.pyAccessGroup.
Both tasks well done in SwitchApplication.jsp, main part of that is function:
<script>
function switchApplication(accessGroup) {
if(accessGroup == null) {
accessGroup = document.getElementById('<pega:reference name="$this-Definition(pyPropertyName)"/>').value;
}
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",accessGroup);
window.location.href = oRedirectUrl.toURL();
}
</script>
To build solution, lets try to write activity with java step or call Show-HTML method for executing functionality of SwitchApplication.jsp on it.
After that, it will be possible to call this activity, pass its name as parameter, in SnapStart request URL.
Pegasystems Inc.
IN
ÐдÑавÑÑвÑйÑе ÐладимиÑ,
Good Evening
Once you able to write your activity, please let me know. We will proceed based on your feedback.
Regards,
Suruchi Gupta
JSC Sberbank of Russia - Ukraine
UA
Hello Suruchi,
Our experiments with customizing JSP is not successful yet.
The other way - to find and customize Activity witch called in PRPC after Authentification of User, but before setting up the default Application. Can you help me to find such Activity ?
Pegasystems Inc.
IN
ÐдÑавÑÑвÑйÑе ÐладимиÑ,
Good Evening
This is to inform you that I tested today snapstart sample code by saving it as html & press submit button and it will take you pega designer portal.
Sample Code :-
HTML>
<title> Snap Start Demo</title>
<Head>
</Head>
<Body>
<center>
<form name="foo" method="post" action="http://wghalbw7:9090/prweb/PRServlet">
<input type="hidden" name="UserIdentifier" value="admin@pathbreakers"></input>
<input type="hidden" name="Password" value="cnVsZXM%3D"></input>
<input type="submit" name="submit"/>
</form>
</center>
</Body>
</HTML>
Kindly let me know your feedback on this.
Regards
Suruchi Gupta
Accepted Solution
ai4process
UA
Hello, Suruchi.
Activity "Chaplic" is ready, it has only one step: Show-HTML with HTML stream = "chapHTML"and one parameter AGname="youAccessGroupactualName".
"chapHTML" text is:
<HTML>
<head>
<title>PRPC starting</title>
<pega:include name="SafeURLInclude"/>
<script>
function switchApp()
{
CAG = "<pega:reference name="AccessGroup.pyAccessGroup"/>"
window.alert("current = " + CAG);
var DAG = "<pega:reference name="Param.AGname"/>"
window.alert("parameter = " + DAG);
<pega:save name="NAG" ref="param.AGname"/>
NAG = "<pega:reference name="$save(NAG)"/>"
window.alert("NAG = " + NAG);
<pega:forEach name="pxRequestor.pxSecuritySnapshot.pxAvailableApps">
<pega:save name="AG" ref="$this.pxAccessGroup"/>
<pega:choose>
<pega:when test="$save(AG)==$save(NAG)">
window.alert("AG is " + "<pega:reference name="$save(NAG)"/>");
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",NAG);
window.location.href = oRedirectUrl.toURL();
</pega:when>
</pega:choose>
Hello, Suruchi.
Activity "Chaplic" is ready, it has only one step: Show-HTML with HTML stream = "chapHTML"and one parameter AGname="youAccessGroupactualName".
"chapHTML" text is:
<HTML>
<head>
<title>PRPC starting</title>
<pega:include name="SafeURLInclude"/>
<script>
function switchApp()
{
CAG = "<pega:reference name="AccessGroup.pyAccessGroup"/>"
window.alert("current = " + CAG);
var DAG = "<pega:reference name="Param.AGname"/>"
window.alert("parameter = " + DAG);
<pega:save name="NAG" ref="param.AGname"/>
NAG = "<pega:reference name="$save(NAG)"/>"
window.alert("NAG = " + NAG);
<pega:forEach name="pxRequestor.pxSecuritySnapshot.pxAvailableApps">
<pega:save name="AG" ref="$this.pxAccessGroup"/>
<pega:choose>
<pega:when test="$save(AG)==$save(NAG)">
window.alert("AG is " + "<pega:reference name="$save(NAG)"/>");
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
oRedirectUrl.put("AccessGroupName",NAG);
window.location.href = oRedirectUrl.toURL();
</pega:when>
</pega:choose>
</pega:forEach>
}
</script>
</head>
<BODY onLoad="switchApp();">
</BODY>
</HTML>
SnapStart URL:
Best Regards,
Volodymyr Podoroga
Pegasystems Inc.
IN
Volodymyr Podoroga nice investigation and pretty good way to solve the issue.
Pegasystems Inc.
IN
ÐдÑавÑÑвÑйÑе ÐладимиÑ,
Good Afternoon
You need to use showdesktop activity. Please let us know if you are using above reply only.
Regards
Suruchi Gupta
JSC Sberbank of Russia - Ukraine
UA
Suruchi, thanks. It's Ok.
Additional info - how to use direct URL to call PRPC Application without UserIdentifier and Password in URL.
If your PRPC cluster uses external SSO system for user authenification (LDAP for example), you can use another servlet: PRServletContainerAuth.
So, the final URL will be:
It works fine.
Pegasystems Inc.
IN
Ok.thanks for info