cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15472
Views
20
Helpful
48
Replies

Linking one guest portal to another guest portal

gthermae
Cisco Employee
Cisco Employee

Hi,

We just spent some time to build a link from a hotspot portal to a guestportal. Just thought I would share the code we inserted in the opt content 2 on the hotspot page. The trick is to take the sessionId from the current url on the hotspot page and add it to the link. Also want to give creds to Christophe Landrain who did most of this.

$(window).ready(function() {

var hostname = window.location.hostname;

var WebSessionId = window.location.href.substr(window.location.href.search("\\?")).split("=")[2];

jQuery('.cisco-ise-body').append(' <center><a href="https://'+hostname+':8449/portal/gateway?sessionId='+WebSessionId+'&portal=a23657f0-d7e2-11e6-a31c-0050568a29f5&action=cwa" style="color: rgb(0,255,0)"><font color="212121">Go to Guest Portal</font></a></center>');

});

//Gunnar

48 Replies 48

Brian Hanson
Level 1
Level 1

Hello community!
I know this is somewhat old post, but this post has helped me out! We have use-case for simple ISE Hotspot AUP for daily guests/visitors, but also like to provide AD Employees with "Extended" Guest/Public Wi-Fi access for their personal devices in which they do not want to enroll in our MDM/BYOD to get on the corporate/private Wi-Fi.

I've tested this out in our deployment and all works great for Windows and Android devices, but alas, iOS devices with CNA do not get anywhere whilst clicking on the "Employee Portal" button on the bottom of the AUP Hotspot portal. Disabling Captive Bypass Portal on WLC is also not preferred option, as would like this to be seamless for end-users and not have to manually open browser/initiate HTTP traffic for this to work.

Are there any other workarounds for this type of setup with Apple iOS devices/CNA?

Hello @Brian Hanson 

It's been a while since I have had to fight with guest portals. I recall that any attempts to modify the code in the guest portal would prevent the CNA from loading it. I suspect that iOS does that to protect the end user and there is no way to disable that on the end device - even if you could, it would be a non-friendly (non plug and play) user experience.

My feeling has always been that if we're getting to the point where we're under the hood and hacking java script, then it's a step too far - ISE has not evolved at all in the portal technology and compared to its closest competitor (Aruba Clearpass) it's a dinosaur. I don't know why Cisco don't focus more on this?  Perhaps it's because portals are generally a horrible concept and only hinder users in getting online, in the vain hope that someone actually reads the AUP and in the even more vain hope, that in future someone might be prosecuted as a result of having contravened a clause in the AUP.

paul
Level 10
Level 10

After spending a few hours at customer with an Apple Developer we were able to fix the portal to portal call issue on iOS devices. The script we had been using for years had two issues:

-The Session ID split capture too much it was getting the Session ID + "&action". We added a 2nd split to fix that.
-The original script had a mix of single and double quotes in the HREF statement. While that is acceptable in HTML the iOS mini-browser didnt seem to like it and kept giving an "Error Loading Page" when the button was clicked. I ended up putting a variable together for the Guest URL and then referencing that variable in the HREF.

Here is the new script that we have tested on iPad, iPhone, Android and Windows device.

<script>
$(window).ready(function() {
var hostname = window.location.hostname;
var WebSessionId = window.location.href.substr(window.location.href.search("\\?")).split("=")[2];
var NewWebSessionId = WebSessionId.split("&")[0];
var GuestUrl = "http://" + hostname + ":8443/portal/PortalSetup.action?portal=0de97ab6-532f-4024-a15c-d6bffd5ef629&sessionId=" + NewWebSessionId + "&action=cwa"
jQuery('.cisco-ise-body').append(' <center><a href='+GuestUrl+' style="color: rgb(0,255,0)"><font color="212121"><button type="button">Click Here For Employee Guest Portal</button></font></a></center>');
});
</script>

Thanks for you response @paul. I will check and let you know.