cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
826
Views
15
Helpful
5
Replies

Automating the changing of the AUP page on the Hotspot Portal

Hi,

We have a two-node ISE deployment, version 3.1.0.518 Patch 3.

We have a customer that has a Hot-Spot portal which grants Internet access. The portal is setup with a PIN on the AUP page. When someone accesses the portal, they need to enter the PIN to allow them access to the Internet.

They have a requirement to change the PIN on the AUP page on a weekly basis.

Is it possible to automatically create a new PIN and email to a distribution list weekly? Their deployment is integrated with the Active Directory.

 

2 Accepted Solutions

Accepted Solutions

I don't have a repository set up.

First, perform a GET request to get the object ID for your Hotspot Portal

curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET  https://$ise_cloud/ers/config/hotspotportal

Then, using the results perform another GET request to get ALL the settings from your portal:

curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET  https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3

Using these results (and you have to use ALL the results.  With the PUT request, any value that is missing is an assumed delete for that value), submit a PUT request

curl --include --insecure --location \
--header 'Content-Type:application/json' \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request PUT https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3 \
--data '{
"HotspotPortal": {
"name": "Hotspot Guest Portal",
"description": "Guests do not require username and password credentials to access the network, but you can optionally require an access code",
"portalType": "HOTSPOTGUEST",
"settings": {
"portalSettings": {
"httpsPort": 8443,
"allowedInterfaces": [
"eth0",
"bond0"
],
"certificateGroupTag": "Default Portal Certificate Group",
"endpointIdentityGroup": "aa178bd0-8bff-11e6-996c-525400b48521",
"coaType": "COAREAUTHENTICATE",
"displayLang": "USEBROWSERLOCALE",
"fallbackLanguage": "English",
"alwaysUsedLanguage": "English"
},
"aupSettings": {
"includeAup": true,
"requireScrolling": false
"requireAccessCode": true,
"accessCode": "ISEisC00L"
},
"postAccessBannerSettings": {
"includePostAccessBanner": false
},
"authSuccessSettings": {
"successRedirect": "AUTHSUCCESSPAGE"
},
"supportInfoSettings": {
"includeSupportInfoPage": false,
 "includeMacAddr": true,
"includeIpAddress": true,
"includeBrowserUserAgent": true,
"includePolicyServer": true,
"includeFailureCode": true,
"emptyFieldDisplay": "HIDE"
}
},
"customizations": {
"portalTheme": {
"id": "9eb421c0-8c01-11e6-996c-525400b48521",
"name": "Default Blue theme"
},
"language": {
"viewLanguage": "English"
},

#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
Content removed for space

The values you need are under "aupSettings", I have made them bold.

DO NOT copy/use the code above as it is only partial and will result in deleting elements from your portal

 

 

 

 

View solution in original post

@Charlie Moreton I just to work on this yesterday and it worked like a dream. It is really impressive. Thanks for all your patience and your help.

View solution in original post

5 Replies 5

Charlie Moreton
Cisco Employee
Cisco Employee

API is the way to go!  You can use the PUT request to automate the changing of the access code.  I show how to do this in the video linked below.  I use the PATCH command that was introduced in 3.2, and while this does make the process much simpler, I also show what is needed to use the PUT command for those versions older than 3.2.

Cisco ISE Simplifies API updates using the 'PATCH' method 

You can see examples and instructions for all things API in ISE at https://cs.co/ise-api 

Thanks Charlie, this looks really interesting. I will have a look over the next few days and let you know.

Hi @Charlie Moreton 

Your youtube video is very good. Do you have a location when all your commands are? It will save me typing them out incorrectly. It looks like I am going to have to use the UPDATE command instead of PATCH. Do you have an example for the UPDATE for changing the AUP code?

 

Thanks

Anthony.

I don't have a repository set up.

First, perform a GET request to get the object ID for your Hotspot Portal

curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET  https://$ise_cloud/ers/config/hotspotportal

Then, using the results perform another GET request to get ALL the settings from your portal:

curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET  https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3

Using these results (and you have to use ALL the results.  With the PUT request, any value that is missing is an assumed delete for that value), submit a PUT request

curl --include --insecure --location \
--header 'Content-Type:application/json' \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request PUT https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3 \
--data '{
"HotspotPortal": {
"name": "Hotspot Guest Portal",
"description": "Guests do not require username and password credentials to access the network, but you can optionally require an access code",
"portalType": "HOTSPOTGUEST",
"settings": {
"portalSettings": {
"httpsPort": 8443,
"allowedInterfaces": [
"eth0",
"bond0"
],
"certificateGroupTag": "Default Portal Certificate Group",
"endpointIdentityGroup": "aa178bd0-8bff-11e6-996c-525400b48521",
"coaType": "COAREAUTHENTICATE",
"displayLang": "USEBROWSERLOCALE",
"fallbackLanguage": "English",
"alwaysUsedLanguage": "English"
},
"aupSettings": {
"includeAup": true,
"requireScrolling": false
"requireAccessCode": true,
"accessCode": "ISEisC00L"
},
"postAccessBannerSettings": {
"includePostAccessBanner": false
},
"authSuccessSettings": {
"successRedirect": "AUTHSUCCESSPAGE"
},
"supportInfoSettings": {
"includeSupportInfoPage": false,
 "includeMacAddr": true,
"includeIpAddress": true,
"includeBrowserUserAgent": true,
"includePolicyServer": true,
"includeFailureCode": true,
"emptyFieldDisplay": "HIDE"
}
},
"customizations": {
"portalTheme": {
"id": "9eb421c0-8c01-11e6-996c-525400b48521",
"name": "Default Blue theme"
},
"language": {
"viewLanguage": "English"
},

#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
Content removed for space

The values you need are under "aupSettings", I have made them bold.

DO NOT copy/use the code above as it is only partial and will result in deleting elements from your portal

 

 

 

 

@Charlie Moreton I just to work on this yesterday and it worked like a dream. It is really impressive. Thanks for all your patience and your help.