09-29-2023 03:18 PM
Grasping to straws here, but I'll give it a shot.
Got an ASA connection profile that uses SAML authentication with Azure AD for guest accounts in our tenant. Authentication works fine, but I would like to pass the username to Cisco ISE for authorization. My ISE is connected to Azure AD with REST ID connection, but passing the guest's username (external email address) only returns "not found". Guest accounts in Azure get the UPN of username_externaldomain.com#EXT#@yourdomain.com, which is probably why there is no match.
The question is: The Advanced - Authorization settings in the connection profile does have a setting for "Username mapping from certificate - Use script to select username". Does anyone know if I could apply a LUA script to translate the username (provided through SAML authentication and not certificate) from username@externaldomain.com to username_externaldomain.com#EXT#@yourdomain.com?? If so, an example of HOW would be much appreciated since I am not an expert with LUA (or scripting in general).
Thanks in advance.
/Rune
10-02-2023 02:30 AM
shell
tunnel-group (tunnel-group-name) general-attributes
authentication-server-group (saml-identity-provider-name)
shell
timeout assertion (timeout-in-seconds)
shell
authentication saml
lua
function saml_change_username(saml_username)
local new_username = saml_username .. "_suffix"
return new_username
end
shell
lua-script saml-change-username-script.lua
10-03-2023 04:56 AM
Thank you for the suggested solution - it got me intrigued to suggest that we could simply use a LUA script to modify the username in such a manner.
However, I cannot see that there is a way to apply a LUA script for the tunnel-group or the SAML IdP in my CLI options for either configuration. Care to elaborate on how this could be achieved?
Brgds
Rune
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide