cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2657
Views
5
Helpful
9
Replies

ISE sponsor portal, restrict domain for the guest email address

HOLGER HAHN
Beginner
Beginner

In 2018 the user dongill asked "Is it possible to do a email validation for “Known Guest” account creation in the sponsor portal?

We have a need to prevent sponsors creating guest accounts with their corporate email addresses?"

https://community.cisco.com/t5/network-access-control/ise-guest-sponsor-portal-restrict-email-address-domain-for-the/td-p/3736892

 

Jason Kunst crated a script to solve this:

https://community.cisco.com/t5/security-documents/ise-sponsor-portal-create-known-accounts-page-customization/ta-p/3636414#toc-hId--1080596999

The part Script will allow only the domains ("domain1","domain2","domain3") is functional.

But the part Script will allow all the other domains except the domains("domain1","domain2","domain3") isn't.

 

The user grabonlee has already pointed this out in the comments and Jason has asked him to open a new one thread.

Because I didn't find such a thread or anything else to solve this problem I asked this again.

 

How can I ristrict domains for the guest email adress?

Our ISE is version 3.0 Patch 4.

1 Accepted Solution

Accepted Solutions

hslai
Cisco Employee
Cisco Employee

Try changing the line with the regex of Restrict the email address entered when creating a known account as below:

from 

return /^(\w+\.?)+@(domain1|domain2|domain3)\.com$/.test( value );

to 

return /^(\w+\.?)+@((?!(domain[1-3])).)*\.com$/.test( value );

 

 

 

View solution in original post

9 Replies 9

HOLGER HAHN
Beginner
Beginner

Now one who can help me?

Jason???

thomas
Cisco Employee
Cisco Employee

Did you  Enable Portal Customization with HTML and JavaScript ?

Did you make any other changes to the script?

Do you get errors on the web console? What are the errors?

 

You need to do some JavaScript troubleshooting.

Hi Thomas,

 

First at all... Why has anyone marked your post as "Accept as Solution"?

I reversed it.

 

Your questions:

 

- Did you  Enable Portal Customization with HTML and JavaScript ?

Of course. Otherwise I couldn't said "The part Script will allow only the domains ("domain1","domain2","domain3") is functional." in my initial description...

 

- Did you make any other changes to the script?

The only thing I've changed was the entry for "var domains (line 5) and the alert output (line 13).

 

- Do you get errors on the web console? What are the errors?

I don't get any errors.

 

How can I troubleshoot JavaScript. Is there any possibility to some kind of step-by-step-debug?

I marked my answer as the Solution because I was the first person to respond in over 1 month and "You need to do some JavaScript troubleshooting"  is The Solution even though you didn't like it.

There are 1000's - maybe 1000000's - of JavaScript resources on the Internet. However, the ISE/NAC community probably isn't the best place to find it.

If you want people's help - especially with custom scripting / programming - you need to include the HTML+JS code you are using so people can easily try to use it,  reproduce your problem, and potentially suggest a fix for the problem you are seeing.

See How to Ask The Community for Help .