{"id":3767,"date":"2020-06-10T16:31:49","date_gmt":"2020-06-10T16:31:49","guid":{"rendered":"http:\/\/axendatacentre.com\/blog\/?p=3767"},"modified":"2020-09-09T16:02:30","modified_gmt":"2020-09-09T16:02:30","slug":"azure-ad-saml-sign-in-with-virtual-smartcard-to-citrix-virtual-apps-desktops","status":"publish","type":"post","link":"http:\/\/axendatacentre.com\/blog\/2020\/06\/10\/azure-ad-saml-sign-in-with-virtual-smartcard-to-citrix-virtual-apps-desktops\/","title":{"rendered":"Azure AD SAML Sign-in with Virtual Smartcard to Citrix Virtual Apps &#038; Desktops"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\"><strong><em><span style=\"text-decoration: underline;\">Consider this an evergreen post as of 10\/06\/2020<\/span><\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Introduction<br><\/strong>The purpose of this blog post to aim for a consistent modern authentication experience for employees when consuming Citrix Virtual Apps &amp; Desktops (CVAD) + CVAD Service regardless of where the (CVAD) workloads are running, either in *Azure, *AWS, *GCP or *On-Premises. The primary priority is that the employees identity is owned and managed by a cloud identity platform e.g Azure Active Directory (AAD) and the employees identity within each resource location* for CVAD usage maps to AD shadow accounts. These AD shadow accounts represent the employee as a UPN e.g human.name@domain, with a RANDOM long complex password that the employee doesn&#8217;t need to ever know and all IT is required to do beyond creating a AD shadow account is then assign the right vs. relevant security privileges and access to CVAD including Policies meeting local, geo of industry compliance and governance while maintaining a great employee experience.<br><br>The second priority is that the employees device can frictionlessly access CVAD resources using either a Forward Proxy, SD-WAN Overlay Network or ICA Proxy. I do recognise that many organisations are still required to make use of a VPN style strategy at the current moment and therefore this solution can also work for those devices as well repurposing the existing Citrix Gateway to also support a Full VPN beyond ICA Proxy or you can use other well established and trusted VPN solution providers.<br><br>Leveraging a <em><span style=\"text-decoration: underline;\">Bring Your Own<\/span><\/em> &#8220;either Enterprise vs. Personal&#8221; <em><span style=\"text-decoration: underline;\">Identity<\/span><\/em> (<em><span style=\"text-decoration: underline;\">ByoI<\/span><\/em>) is a concept I ponded way back in 2017 and now feels like the right time to pick that up concept again during the current Workplace transformation happening all around the world due to world wide COVID-19 pandemic. Using a ByoI strategy as high level vision  you can efficiently deploy CVAD to any *Azure, *AWS, *GCP region or *On-Premises with less friction and you don&#8217;t need to be worry about &#8220;Password Syncing&#8221; just replicate the employee&#8217;s UPN + AD Security Privileges + CVAD Access &amp; Policies where its required. It has the added benefit if you want do mix and match public cloud workloads to avoid lock-in amongst other topics, you&#8217;ll be providing a common and consistent login interface + experience irrespective of where the workload is sat.<br><br>It another brilliant benefit is the on-boarding of 3rd Parties (3P&#8217;s) using ByoI concept with a business check at the edge, the 3P brings there owned Identity and in the current world we live in I don&#8217;t think that is bad thing it could even strength that employees individual security as there identity will be bound to a smartphone which knows more about your individuals habits and you that you know yourself. If we can unlock a co-shared responsibility identity model between the individual + organisation we can truly aim for a passwordless workspace that only uses virtual smartcards or tokens. <br><br>Finally the on-boarding of M&amp;A employees can be faster as you can generate them a few days after commercial signing with a new brand identity that resides in Azure AD (or Google, OKTA e.t.c) whilst they continue accessing existing workplace apps + data with current AD credentials, IT + HR + Business can choose when to layer in the &#8220;NEW&#8221; Workspace Platform for Work from group perspective into the existing Workspace with less friction and complexity. Yes this final topic is complex when we think about merging different Business IT and IT Systems together, a CVAD strategy with FAS bridges the GAP reducing friction and complexity for IT to sun rise a new Workspace stack for that newly acquired organisation while sunsetting the exciting Workspace stack and those new M&amp;A employees get to on-board beyond the Workspace into there new organisations people, its culture, vision and values and avoids the IP drain that often can easily happen. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Employee Experience<\/strong><\/p>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\"><a href=\"https:\/\/twitter.com\/hashtag\/AzureAD?src=hash&amp;ref_src=twsrc%5Etfw\">#AzureAD<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/SAML?src=hash&amp;ref_src=twsrc%5Etfw\">#SAML<\/a> Sign-in with a Virtual Smartcard for <a href=\"https:\/\/twitter.com\/citrix?ref_src=twsrc%5Etfw\">@citrix<\/a> Virtual Apps &amp; Desktops enabling a consistent SSO experience when running workloads in <a href=\"https:\/\/twitter.com\/hashtag\/Azure?src=hash&amp;ref_src=twsrc%5Etfw\">#Azure<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/AWS?src=hash&amp;ref_src=twsrc%5Etfw\">#AWS<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GCP?src=hash&amp;ref_src=twsrc%5Etfw\">#GCP<\/a> On-Premises or in all of them. <a href=\"https:\/\/t.co\/38FDBLgNfJ\">pic.twitter.com\/38FDBLgNfJ<\/a><\/p>\u2014 Lyndon-Jon Martin \ud83d\udc68\ud83c\udffb\u200d\ud83d\udcbb (@lyndonjonmartin) <a href=\"https:\/\/twitter.com\/lyndonjonmartin\/status\/1270683158099513344?ref_src=twsrc%5Etfw\">June 10, 2020<\/a><\/blockquote> <script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>High Level Architecture<\/strong><br>The scenario below depicts accessing a StoreFront server on any device type from within the Workplace fabric in any office locally or world wide or from a IT managed device that makes use of a Full VPN, Forward Proxy technology;  WFH Citrix SD-WAN appliance where traffic passes over an SD-WAN overlay network; Citrix Endpoint Management enrolled smart device with per-app mVPN configured and finally irrespective of the devices management status you can use <strong><span style=\"text-decoration: underline;\"><em>ICA Proxy<\/em><\/span><\/strong>* to access CVAD resources anywhere over the internet inclusive of any home via a Citrix ADC (formerly NetScaler) using the Gateway functionality which is &#8220;<strong><em><span style=\"text-decoration: underline;\">VPN-Less<\/span><\/em><\/strong>*&#8221;.<\/p>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Architecture for using <a href=\"https:\/\/twitter.com\/hashtag\/AzureAD?src=hash&amp;ref_src=twsrc%5Etfw\">#AzureAD<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/SAML?src=hash&amp;ref_src=twsrc%5Etfw\">#SAML<\/a> converted to a Virtual Smartcard to SSO onto <a href=\"https:\/\/twitter.com\/citrix?ref_src=twsrc%5Etfw\">@citrix<\/a> Virtual Apps &amp; Desktops enabling a consistent SSO experience when running workloads in <a href=\"https:\/\/twitter.com\/hashtag\/Azure?src=hash&amp;ref_src=twsrc%5Etfw\">#Azure<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/AWS?src=hash&amp;ref_src=twsrc%5Etfw\">#AWS<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GCP?src=hash&amp;ref_src=twsrc%5Etfw\">#GCP<\/a> On-Premises or in all of them. <a href=\"https:\/\/t.co\/DAt6MukmIO\">pic.twitter.com\/DAt6MukmIO<\/a><\/p>\u2014 Lyndon-Jon Martin \ud83d\udc68\ud83c\udffb\u200d\ud83d\udcbb (@lyndonjonmartin) <a href=\"https:\/\/twitter.com\/lyndonjonmartin\/status\/1270684063754575872?ref_src=twsrc%5Etfw\">June 10, 2020<\/a><\/blockquote> <script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Systems Requirements &amp; Pre-requisites<\/strong><br>1. A UAT or Test CVAD 1912 LTSR Site that already setup. My personal one runs in AWS EC2 as it retains hosting connections or public clouds to preform MCS provisioning of machines from customer own and managed control plane. You can also use the Citrix Virtual Apps &amp; Desktops (CVAD) Service or sign-up at <a rel=\"noreferrer noopener\" href=\"https:\/\/citrix.cloud.com\/\" target=\"_blank\">https:\/\/citrix.cloud.com\/ <\/a>and engage your local Citrix representatives to get a trial setup for the CVAD Service.<br>2. Deploy a new VM which will run the following Citrix 1912 LTRS StoreFront and Federated Authentication Service (FAS) roles to create a new &#8220;Store&#8221; on StoreFront called &#8220;AAD&#8221; which will be configured to accept the Azure AD SAML token which will then convert the AAD SAML tokens into a Citrix virtual smartcard to SSO the employee onto CVAD resources. <br>3. Install StoreFront &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.citrix.com\/en-us\/storefront\/1912-ltsr\/install-standard.html\" target=\"_blank\">https:\/\/docs.citrix.com\/en-us\/storefront\/1912-ltsr\/install-standard.html<\/a> after reading the system requirements &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.citrix.com\/en-us\/storefront\/1912-ltsr\/system-requirements.html\" target=\"_blank\">https:\/\/docs.citrix.com\/en-us\/storefront\/1912-ltsr\/system-requirements.html<\/a>.<br>4. Setup and Configure FAS Role on your StoreFront Server &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.citrix.com\/en-us\/federated-authentication-service\/1912\/install-configure.html\" target=\"_blank\">https:\/\/docs.citrix.com\/en-us\/federated-authentication-service\/1912\/install-configure.html<\/a> after reading the system requirements carefully &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.citrix.com\/en-us\/federated-authentication-service\/1912\/system-requirements.html\" target=\"_blank\">https:\/\/docs.citrix.com\/en-us\/federated-authentication-service\/1912\/system-requirements.html<\/a>, this part shouldn&#8217;t be a problem e.g leaning on on Security teams whom control the Enterprise CA Admins as you&#8217;ll hopefully be using a  proper UAT or Test CVAD environment with all the Microsoft management servers and roles including an Enterprise CA which FAS requires and access to AD introduce new GPO&#8217;s.<br>5. An Azure AD &#8220;personal or business test&#8221; tenant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deployment Guide<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Azure AD Setup &amp; Configuration &#8211; Personal Home Lab Edition<\/span><\/em><br>If you have a separate Azure AD tenant in Azure you can proceed to the next section, however if you are an IT Pro that wants to test out how to convert Azure AD SAML logins to Citrix virtual smartcards for CVAD the following the below guidance below for setting up a personal ADD tenant with a personal Azure account for your home lab. <strong><u><i>WARNING I am not an Azure AD nor on-premises AD expert, therefor follow the leading practises found in Microsofts documentation for Azure AD.<\/i><\/u><\/strong><br><br>1. Navigate to\u00a0<a href=\"https:\/\/portal.azure.com\/\">https:\/\/portal.azure.com<\/a>\u00a0and sign-in with your live vs. personal Microsoft account. Select \u201c<span style=\"text-decoration: underline;\">Create a resource<\/span>\u201d.<br>2. Select \u201c<span style=\"text-decoration: underline;\">Identity<\/span>\u201d then select \u201c<span style=\"text-decoration: underline;\">Azure Active Directory<\/span>\u201d.<br>3. Enter in an \u201c<span style=\"text-decoration: underline;\">Organisation Name<\/span>, <span style=\"text-decoration: underline;\">Initial domain name<\/span> and select your <span style=\"text-decoration: underline;\">Country or region<\/span>\u201d.<br>4. The wizard will begin creating your AAD tenant\u00a0.<br>5. Once it completes click the hyperlink within \u201cClick <span style=\"text-decoration: underline;\">here<\/span> to manage your new directory\u201d.<br>6. At the Overview page of your new AAD tenant select \u201c<span style=\"text-decoration: underline;\">Users<\/span>\u201d under \u201c<span style=\"text-decoration: underline;\">Manage<\/span>\u201d section.<br>7. Select \u201c<span style=\"text-decoration: underline;\">+ New user<\/span>\u201d under the \u201c<span style=\"text-decoration: underline;\">All Users (Preview)<\/span>\u201d Overview you\u2019ll notice your personal email addr.<br>8. You\u2019ll notice when creating a new employee account for your AAD tenant that you can only append domain.onmicrosoft.com to the username, I\u2019ll explain how-to convert that to user@domain and remove the UPN requirement of user@doamin.onmicrosoft.com in the next few steps. For now fill the following fields \u201c<span style=\"text-decoration: underline;\">User name<\/span>\u201d; \u201c<span style=\"text-decoration: underline;\">Name<\/span>\u201d; \u201c<span style=\"text-decoration: underline;\">First name<\/span>\u201d; \u201c<span style=\"text-decoration: underline;\">Last name<\/span>\u201d; \u201c<span style=\"text-decoration: underline;\">Password<\/span>\u201d (choose or auto-generate) and the select \u201c<span style=\"text-decoration: underline;\">Create<\/span>\u201d keeping the defaults as they are.<br>9. Your new AAD employee is successful created, you can assign roles. NOTE for my personal testing purposes I didn\u2019t configure anything as I&#8217;ll delete that test employee AAD account after my testing.<br>10. <em><span style=\"text-decoration: underline;\"><strong>At this point I&#8217;m not going to deploy nor setup the \u201cAzure AD Connect\u201d in my Citrix Cloud Resource Location as I want the employees primary identity to always reside in Azure AD as the single source of truth, and then bring that identity to my Citrix Cloud Resource Location e.g Bring your own Identity (ByoI) and after a successful AAD SAML login map that to a hardened AD Shadow account with long complex password that the employee will never know and all I need to do it assign the AD security privilege and access for CVAD resources.<\/strong><\/span><\/em> This approach\u00a0means that employee will NEVER enter in a AD password within a Citrix Cloud Resource Location that is configured for AAD (or Google, OKTA e.t.c) when using CVAD 1912 LTSR StoreFront and the Federated Authentication Service (FAS) in a Resource Location(s). For complex environments yes you\u2019ll likely deploy the \u201c<span style=\"text-decoration: underline;\">Azure AD Connect<\/span>\u201d software as a role somewhere to replicate the employees but you don\u2019t need to replicate there passwd or you can provision the employee twice once in AAD as in the example above and then again manually in AD in the Resource Location as there corresponding AD shadow account which matches the UPN from AAD when authenticating using SAML to StoreFront, the choice is yours but I found for testing purposes a manual in each is far less frictionless.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">On-Premises Active Directory (AD) within your Resource Location<\/span><\/em><br>1.Create a new AD &#8220;<span style=\"text-decoration: underline;\">Shadow<\/span>&#8221; account that matches the &#8220;<span style=\"text-decoration: underline;\">User Principal Name (UPN)<\/span>&#8221; in AAD e.g user@domain, generate a random long complex password which they don&#8217;t need know and then assign or inherit the right vs. relevant AD security groups, GPOs that you would usually assign to a CVAD consumer.<br>2. On-board your domain into Azure AD which required verifying it with a MX record to avoid using user@domain.onmicrosoft.com so that you can use user@domain keeping it simple and less complex. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Installation and Configuring the Federated Authentication Service (FAS)<\/span><\/em><br>1. On the new VM that you just installed 1912 LTSR StoreFront role onto from the existing mounted ISO run the autorun splash screen and select \u201c<span style=\"text-decoration: underline;\">Federated Authentication Service<\/span>\u201d.<br>2.Read the EULA which you\u2019ll need to \u201c<span style=\"text-decoration: underline;\">Accept the Licenses Agreement<\/span>\u201d to continue.<br>3. Accept the defaults and select \u201cNext\u201d on the &#8220;<span style=\"text-decoration: underline;\">Core Components<\/span>&#8221; page.<br>4. Accept the defaults and select \u201cNext\u201d on the &#8220;<span style=\"text-decoration: underline;\">Firewall<\/span>&#8221; page.<br>5. Once the installer is finished select \u201cFinish\u201d to close.<br>6. Open a PowerShell window in Admin mode then copy &amp; paste the following code below, which will enable a trust between the CVAD Controller and the StoreFront server, minimise this window you&#8217;ll require it later.<br><br><em>Set-BrokerSite -TrustRequestsSentToTheXmlServicePort $true<br><\/em><br>7. Navigate to the following path \u201c<span style=\"text-decoration: underline;\">C:\\Program Files\\Citrix\\Federated Authentication Service\\PolicyDefinitions\\<\/span>\u201d on the current StoreFront server that you installed FAS role onto, copy the following two files \u201cCitrixFederatedAuthenticationService.admx\u201d and \u201cCitrixBase.admx\u201d the entire folder \u201c<span style=\"text-decoration: underline;\">en-US<\/span>\u201d to a network share which will need to be accessible from your Windows Domain Controller or WDC.<br>8. Connect to your Windows Domain Controller (WDC) via RDS from the current StoreFront + FAS server and copy the two *.admx FAS files including folder \u201c<span style=\"text-decoration: underline;\">en-US<\/span>\u201d from your network share to the following path on the \u201c<span style=\"text-decoration: underline;\">C:\\Windows\\PolicyDefinitions<\/span>\u201d on your WDC.<br>9. Open an \u201c<span style=\"text-decoration: underline;\">MMC<\/span>\u201d console and load the \u201c<span style=\"text-decoration: underline;\">Group Policy Management Editor<\/span>\u201d snap-in, at the&nbsp;prompt for a Group Policy Object, select&nbsp;\u201c<span style=\"text-decoration: underline;\">Browse<\/span><strong>\u201d<\/strong>&nbsp;and then select \u201dDefault Domain Policy\u201d.<br>10. In the MMC console navigate to \u201c<span style=\"text-decoration: underline;\">Default Domain Policy [server name] &gt; Computer Configuration &gt; Policies &gt; Administrative Templates &gt; Citrix Components &gt; Authentication<\/span>\u201d and you should see the following three policies available \u201cFederated Authentication Service\u201d, \u201c<span style=\"text-decoration: underline;\">StoreFront FAS Rule<\/span>\u201d and \u201c<span style=\"text-decoration: underline;\">In-session Certificates<\/span>\u201d.<br>11. Select and open the \u201c<span style=\"text-decoration: underline;\">Federated Authentication Service<\/span>\u201d policy, next select to \u201c<span style=\"text-decoration: underline;\">Enable<\/span>\u201d it followed by selecting the \u201c<span style=\"text-decoration: underline;\">Show<\/span>\u201d button parallel to \u201c<span style=\"text-decoration: underline;\">DNS Addresses<\/span>\u201d label and enter in the FQDN e.g. \u201c<span style=\"text-decoration: underline;\">server.domain<\/span>\u201d of your StoreFront + FAS server and then select \u201c<span style=\"text-decoration: underline;\">OK<\/span>\u201d and then select \u201c<span style=\"text-decoration: underline;\">OK<\/span>\u201d to save the policy configuration and enabling FAS.<br>12. Next select and open \u201c<span style=\"text-decoration: underline;\">In-session Certificates<\/span>\u201d and select \u201c<span style=\"text-decoration: underline;\">Enabled<\/span>\u201d and in the \u201c<span style=\"text-decoration: underline;\">Consent timeout (seconds):<\/span>\u201d field type in a value of &#8220;<span style=\"text-decoration: underline;\">30<\/span>&#8221; which is the default.<br>13. Next close the MMC console and open up the existing PowerShell (Admin mode) and copy and paste the following code to force a Group Policy Update.&nbsp;<br><br><em>gpupdate \/force<\/em><br><br>14. Minimise the RDS connection from your WDC so that you are back on your StoreFront + FAS server. Search and open up Citrix FAS in Admin mode, if you don\u2019t you will be notified in the UI and then select \u201c<span style=\"text-decoration: underline;\">run this program as administrator<\/span>\u201d which will reload the FAS UI in Admin mode.<br>15. Select to \u201c<span style=\"text-decoration: underline;\">Deploy<\/span>\u201d for \u201c<span style=\"text-decoration: underline;\">Deploy certificate templates<\/span>\u201d.<br>16. Select \u201c<span style=\"text-decoration: underline;\">Ok<\/span>\u201d on the pop-up window that appears.<br>17. You\u2019ve now successfully deployed the certificate templates, now select \u201c<span style=\"text-decoration: underline;\">Publish<\/span>\u201d for \u201c<span style=\"text-decoration: underline;\">Set up a certificate authority<\/span>\u201d.<br>18. Select the right Enterprise Certificate Authority (CA) from the available list and select \u201c<span style=\"text-decoration: underline;\">Ok<\/span>\u201d.<br>19. You\u2019ve now deployed the certificate templates successfully to your Enterprise CA, now select \u201c<span style=\"text-decoration: underline;\">Authorize<\/span>\u201d for \u201c<span style=\"text-decoration: underline;\">Authorize this service<\/span>\u201d.<br>20. Select the right Enterprise Certificate Authority (CA) from the available list (same as above) and select \u201c<span style=\"text-decoration: underline;\">Ok<\/span>\u201d.<br>21. The FAS UI will display a spinning icon as the authorisation request is pending on the Enterprise CA server.&nbsp;<br>22. Connect to your Enterprise CA via RDS and the \u201c<span style=\"text-decoration: underline;\">Microsoft&nbsp;Certification Authority<\/span>\u201d&nbsp;MMC Console and navigate to \u201c<span style=\"text-decoration: underline;\">CA &gt; CA Server &gt; Pending Requests<\/span>\u201d you\u2019ll see pending certificate right click it select \u201c<span style=\"text-decoration: underline;\">All Tasks &gt; Issue<\/span>\u201d and the certificate will be issued.&nbsp;<br>23. Verify the issues certificates are issued by selecting \u201c<span style=\"text-decoration: underline;\">Issued Certificates<\/span>\u201d and verify you can see two issues certificated that begin with \u201c<span style=\"text-decoration: underline;\">Citrix_RegistrationAu\u2026<\/span>\u201d.<br>24. Minimise your RDS session to your Enterprise CA and return to the StoreFront + FAS server, you now notice the \u201c<span style=\"text-decoration: underline;\">Authorize this service<\/span>\u201d says \u201c<span style=\"text-decoration: underline;\">Reauthorize<\/span>\u201d which is correct as the FAS service is now authorised with the Enterprise CA. Next select \u201cCreate\u201d for \u201c<span style=\"text-decoration: underline;\">Create a rule<\/span>\u201d, which launch a new window.<br>25. Accept the default \u201c<span style=\"text-decoration: underline;\">Create the default rule (recommended)<\/span>\u201d&nbsp;and select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>26. Accept the default \u201c<span style=\"text-decoration: underline;\">Citrix_SmartcardLogon (recommended)<\/span>\u201d&nbsp;and select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>27. Select the previously selected and configured Enterprise CA you Authorised and select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>28. Select \u201c<span style=\"text-decoration: underline;\">Allow in-session use<\/span>\u201d and select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d if you enabled the following policy \u201c<span style=\"text-decoration: underline;\">In-session Certificates<\/span>\u201d earlier.<br>29. Select \u201c<span style=\"text-decoration: underline;\">Manage StoreFront access permissions (access is currently denied)<\/span>\u201d in red text which will open a new window.<br>30. Remove \u201c<span style=\"text-decoration: underline;\">Domain Computers<\/span>\u201d and add the \u201c<span style=\"text-decoration: underline;\">Server<\/span>\u201d running the StoreFront + FAS roles and under \u201c<span style=\"text-decoration: underline;\">Permissions<\/span>\u201d to \u201c<span style=\"text-decoration: underline;\">Allow<\/span>\u201d then select \u201c<span style=\"text-decoration: underline;\">Apply<\/span>\u201d and \u201cOk\u201d.<br>31. The screen will update with \u201c<span style=\"text-decoration: underline;\">Manage StoreFront access permissions<\/span>\u201d to now be in blue text, now select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d. <br>32. Select \u201c<span style=\"text-decoration: underline;\">Manage user access permissions (all users are currently allowed)<\/span>\u201d in red text which will open a new window.<br>33. You can change to default \u201c<span style=\"text-decoration: underline;\">Domain Users<\/span>\u201d to your own test AD security group, then under \u201c<span style=\"text-decoration: underline;\">Permissions<\/span>\u201d to \u201c<span style=\"text-decoration: underline;\">Allow<\/span>\u201d then select \u201c<span style=\"text-decoration: underline;\">Apply<\/span>\u201d and \u201c<span style=\"text-decoration: underline;\">Ok<\/span>\u201d.<br>34. The screen will update with \u201c<span style=\"text-decoration: underline;\">Manage user permissions (all users are currently allowed)<\/span>\u201d to now be blue text, now select \u201c<span style=\"text-decoration: underline;\">Manage VDA permissions (all VDAs are currently allowed)<\/span>\u201d which is in red text.<br>35. You can change to default \u201c<span style=\"text-decoration: underline;\">Domain Computers<\/span>\u201d to your own test AD security group that your Citrix Virtual Delivery Agents (VDA) are found within, then under \u201c<span style=\"text-decoration: underline;\">Permissions<\/span>\u201d to \u201c<span style=\"text-decoration: underline;\">Allow<\/span>\u201d then select \u201cApply\u201d and \u201cOk\u201d.<br>36. The screen will update with \u201c<span style=\"text-decoration: underline;\">Manage VDA permissions (all VDAs are currently allowed)<\/span>\u201d to now in blue text, now select \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>37. Now select \u201c<span style=\"text-decoration: underline;\">Create<\/span>\u201d and a &#8220;Default&#8221; FAS rule.<br>38. You have now successfully setup and configured Citrix FAS, you still need to enable FAS Claims for your &#8220;AAD&#8221; store on StoreFront which is covered later in this blog post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Creating a new Store call &#8220;AAD&#8221; for Azure AD SAML Authentication in StoreFront<\/span><\/em><br>1. Open Studio and select &#8220;<span style=\"text-decoration: underline;\">StoreFront<\/span>&#8221; then select \u201c<span style=\"text-decoration: underline;\">Stores<\/span>\u201d and the on the \u201c<span style=\"text-decoration: underline;\">Actions tab<\/span>\u201d select \u201c<span style=\"text-decoration: underline;\">Create Store<\/span>\u201d.<br>2. On the splash screen select &#8220;<span style=\"text-decoration: underline;\">Next<\/span>&#8220;.<br>3. Type in \u201cAAD\u201d for the \u201c<span style=\"text-decoration: underline;\">Store Name<\/span>\u201d field and click \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>4. Select \u201c<span style=\"text-decoration: underline;\">Add<\/span>\u201d list a CVAD controller, a new window will appear where you need provide the following information a \u201c<span style=\"text-decoration: underline;\">Display Name<\/span>\u201d e.g Citrix Cloud Connectors vs. CVAD 1912 LTSR, for the &#8220;<span style=\"text-decoration: underline;\">Type<\/span>&#8221; select \u201c<span style=\"text-decoration: underline;\">Citrix Virtual Apps and Desktops<\/span>\u201d and under \u201c<span style=\"text-decoration: underline;\">Servers<\/span>\u201d list select \u201c<span style=\"text-decoration: underline;\">Add<\/span>\u201d and type in the Citrix Cloud Connector or CVAD 1912 LTSR addresses and choose \u201c<span style=\"text-decoration: underline;\">Transport type<\/span>\u201d either HTTP 80 or HTTPS 443 (Preferred) and click &#8220;OK&#8221;.<br>5. You are now returned to the &#8220;<span style=\"text-decoration: underline;\">Delivery Controller<\/span>&#8221; page with a list of either Citrix Cloud Connectors or CVAD Controllers 1912 LTSR, click &#8220;<span style=\"text-decoration: underline;\">Next<\/span>&#8220;.<br>6. Now on the &#8220;<span style=\"text-decoration: underline;\">Configure Authentication Methods<\/span>&#8221; page select \u201c<span style=\"text-decoration: underline;\">SAML Authentication<\/span>\u201d and leave \u201c<span style=\"text-decoration: underline;\">User name and password<\/span>\u201d checked as YES, then click \u201c<span style=\"text-decoration: underline;\">Next<\/span>\u201d.<br>7. Ignore &#8220;<span style=\"text-decoration: underline;\">Remote Access<\/span>&#8221; configuration and click &#8220;<span style=\"text-decoration: underline;\">Next<\/span>&#8220;. <em>NOTE: I will update this blog post at a later date with the Remote Access via Citrix Gateway formerly NetScaler Gateway.<\/em><br>8. Accept the default&#8217;s on the &#8220;<span style=\"text-decoration: underline;\">Configure XenApp Services URL<\/span>&#8221; and click &#8220;Create&#8221;.<br>9. StoreFront will begin creating your new &#8220;AAD&#8221; Store on your StoreFront server, once the wizard completes select &#8220;<span style=\"text-decoration: underline;\">Test Site<\/span>&#8221; to verify you can see a webpage that displays Citrix Receiver or you can navigate to \u201c<span style=\"text-decoration: underline;\">https:\/\/FQDN\/Citrix\/AADWeb\/<\/span>\u201d&nbsp;replacing the FQDN with your own to verify the webpage is available. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Generating AAD SAML Configuration for StoreFront<\/span><\/em><br>1. In the Azure AD UI in the Azure Portal select \u201c<span style=\"text-decoration: underline;\">Enterprise applications<\/span>\u201d node.<br>2. When the UI updates in the centre select &#8220;<span style=\"text-decoration: underline;\">Select \u201cNew application<\/span>\u201d.<br>3. You are taken to the &#8220;<span style=\"text-decoration: underline;\">Add an Application<\/span>&#8221; wizard and presented with three options select &#8220;<span style=\"text-decoration: underline;\">Non-gallery application<\/span>&#8220;.<br>4. Next provide a name for your own application e.g AAD-SAML-CVAD1912LTSR and then click &#8220;<span style=\"text-decoration: underline;\">Add<\/span>&#8221; at the bottom.<br>5. The AAD wizard completes and you are taken to the &#8220;<span style=\"text-decoration: underline;\">Overview<\/span>&#8221; page for &#8220;<span style=\"text-decoration: underline;\">AAD-SAML-CVAD1912LTSR<\/span>&#8220;, now select &#8220;<span style=\"text-decoration: underline;\">Users and groups<\/span>&#8221; from within this view.<br>6. Add an native AAD user(s). Note do not add any employee that does not have a AD shadow account setup and configured in the Citrix Cloud Resource Location (RL).<br>7. Now from the same &#8220;<span style=\"text-decoration: underline;\">Overview<\/span>&#8221; page for &#8220;<span style=\"text-decoration: underline;\">AAD-SAML-CVAD1912LTSR<\/span>&#8221; select &#8220;<span style=\"text-decoration: underline;\">Single<\/span> <span style=\"text-decoration: underline;\">Sign-on<\/span>&#8221; and on the &#8220;<span style=\"text-decoration: underline;\">Select a single sign-on method<\/span>&#8221; wizard select &#8220;<span style=\"text-decoration: underline;\">SAML<\/span>&#8221; and will start the AAS SAML wizard.<br>8. Select the pencil icon for &#8220;<span style=\"text-decoration: underline;\">Basic SAML Configuration<\/span>&#8221; to configure the following fields as follows below and select &#8220;<span style=\"text-decoration: underline;\">Add<\/span>&#8220;.<br><br><strong>Identifier (Entity ID):<\/strong>&nbsp;https:\/\/FQDN\/Citrix\/AADAuth<br><strong>Reply URL (Assertion Consumer Service URL):<\/strong>https:\/\/FQDN\/Citrix\/AADAuth\/SamlForms\/AssertionConsumerService<br><strong>Sign on URL:<\/strong>&nbsp;https:\/\/FQDN\/Citrix\/AADWeb<br><br>9. Check under &#8220;User Attributes &amp; Claims&#8221; portion that the &#8220;<span style=\"text-decoration: underline;\">Name<\/span>&#8221; field is configured to \u201c<span style=\"text-decoration: underline;\">user.userprincipalname<\/span>\u201d.<br>10. Scroll to &#8220;SAML Signing Certificate&#8221; and click to download the \u201c<span style=\"text-decoration: underline;\">Federation Metadata XML<\/span>\u201d  e.g. AAD-SAML-CVAD1912LTSR.xml, now save or transfer it to your StoreFront server at C:\\Temp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Create and Configure a Azure AD SAML Trust in StoreFront<\/span><\/em><br>1. If you have transferred the *.xml file e.g &#8220;<span style=\"text-decoration: underline;\">AAD-SAML-CVAD1912LTSR.xml<\/span>&#8220;, then on your StoreFront server create a folder called \u201c<span style=\"text-decoration: underline;\">Temp<\/span>\u201d on \u201cC:\\\u201d and transfer the downloaded *.xml file.<br>2.Open PowerShell in admin mode or launch it from Studio 1912 LTSR. Copy &amp; paste the following code below, however if opening the PowerShell with Admin privileges without Studio 1912 LTSR then copy &amp; paste this cmdlet first before proceeding with the  configuration <strong>&amp; &#8220;$Env:PROGRAMFILES\\Citrix\\Receiver StoreFront\\Scripts\\ImportModules.ps1<\/strong>&#8220;. You will notice the virtual path for the Store is already set here to AAD so you can copy and paste it as is. This code sets up and configures SAML for the ADD Store.<br><br><em>$storeVirtualPath&nbsp;=&nbsp;&#8220;\/Citrix\/AAD&#8221;&nbsp;<\/em><br><em>$auth&nbsp;=&nbsp;Get-STFAuthenticationService&nbsp;-Store&nbsp;(Get-STFStoreService&nbsp;-VirtualPath&nbsp;$storeVirtualPath)&nbsp;<br>$spId&nbsp;=&nbsp;$auth.AuthenticationSettings[&#8220;samlForms&#8221;].SamlSettings.ServiceProvider.Uri.AbsoluteUri&nbsp;<br>$acs&nbsp;=&nbsp;New-Object&nbsp;System.Uri&nbsp;$auth.Routing.HostbaseUrl,&nbsp;($auth.VirtualPath&nbsp;+&nbsp;&#8220;\/SamlForms\/AssertionConsumerService&#8221;)&nbsp;<br>$md&nbsp;=&nbsp;New-Object&nbsp;System.Uri&nbsp;$auth.Routing.HostbaseUrl,&nbsp;($auth.VirtualPath&nbsp;+&nbsp;&#8220;\/SamlForms\/ServiceProvider\/Metadata&#8221;)&nbsp;<br>$samlTest&nbsp;=&nbsp;New-Object&nbsp;System.Uri&nbsp;$auth.Routing.HostbaseUrl,&nbsp;($auth.VirtualPath&nbsp;+&nbsp;&#8220;\/SamlTest&#8221;)&nbsp;<br>Write-Host&nbsp;&#8220;SAML Service Provider information:&nbsp;<br>Service Provider ID:&nbsp;$spId&nbsp;<br>Assertion Consumer Service:&nbsp;$acs&nbsp;<br>Metadata:&nbsp;$md&nbsp;<br>Test Page:&nbsp;$samlTest&nbsp;&#8220;<\/em>&nbsp;<br><br>3. Next copy and paste the following code which will ingest SAML configuration from the Azure AD *.xml that you downloaded earlier and copied to C:\\Temp on the StoreFront server.  <br><br><em>Get-Module &#8220;Citrix.StoreFront*&#8221; -ListAvailable | Import-Module<br># Remember to change this with the virtual path of your Store.<br>$StoreVirtualPath = &#8220;\/Citrix\/AAD&#8221;<br>$store = Get-STFStoreService -VirtualPath $StoreVirtualPath<br>$auth = Get-STFAuthenticationService -StoreService $store<br>Update-STFSamlIdPFromMetadata -AuthenticationService $auth -FilePath &#8220;C:\\Temp\\AAD-SAML-CVAD1912LTSR.xml&#8221;<\/em><br><br>4. Validate there are not error(s) on screen that need resolving. <br>5. Minimise your PowerShell window you&#8217;ll need it again shortly, now open up Studio or StoreFront MMC console and navigate to the &#8220;<span style=\"text-decoration: underline;\">Stores<\/span>&#8221; and select &#8220;<span style=\"text-decoration: underline;\">AAD<\/span>&#8221; and select &#8220;<span style=\"text-decoration: underline;\">Manage Authentication Methods<\/span>&#8220;.<br>6. Select the cog icon parallel to \u201c<span style=\"text-decoration: underline;\">SAML Authentication<\/span>\u201d and then select \u201c<span style=\"text-decoration: underline;\">Identity Provider<\/span>\u201d you should see that your AAD SAML configuration is setup and configured, leave it as is DO NOT TOUCH it!<br>7. Close all windows including Studio or StoreFront.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><span style=\"text-decoration: underline;\">Enabling FAS for Converting Azure AD SAML Tokens to Virtual Smartcards<\/span><\/em><br>1.Open up your existing PowerShell window and copy and paste the following code below, which will ENABLE FAS for your ADD Store to convert AAD SAML tokens received into virtual smartcard that will be used to SSO the employee onto his\/her Citrix virtual app and or desktop. You&#8217;ll notice the code is configured for the &#8220;<span style=\"text-decoration: underline;\">AAD<\/span>&#8221; Store so you can copy and paste as is.<br><br><em>Get-Module &#8220;Citrix.StoreFront.*&#8221; -ListAvailable | Import-Module<br>$StoreVirtualPath = &#8220;\/Citrix\/AAD&#8221;<br>$store = Get-STFStoreService -VirtualPath $StoreVirtualPath<br>$auth = Get-STFAuthenticationService -StoreService $store<br>Set-STFClaimsFactoryNames -AuthenticationService $auth -ClaimsFactoryName &#8220;FASClaimsFactory&#8221;<br>Set-STFStoreLaunchOptions -StoreService $store -VdaLogonDataProvider &#8220;FASLogonDataProvider&#8221;<\/em><br><br>2. Validate there are not error(s) on screen that need resolving, if there are none you can nose close the PowerShell window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Testing your Azure AD SAML to Virtual Smartcard Login<\/strong><br>1. Navigate to https:\/\/FQDN\/Citrix\/AADWeb which will redirect you to a AAD login.<br>2. Enter in your UPN e.g user@domain and then complete the required 2FA vs. MFA requirements setup by your organisation as requirement onscreen.<br>3. You will be returned to https:\/\/FQDN\/Citrix\/AADWeb and SSOed onto UI, depending on your setting your desktop will either auto launch of you&#8217;ll have to manually launch it yourself. The initial login will take slightly longer than usual as its generating you that initial virtual smartcard between StoreFront, FAS, AD and your Enterprise CA.<br>4. Your Citrix vDesktop or vApp should launch successfully and SSO the on without prompting for any credentials.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Troubleshooting<\/strong> <br>1.If you receive ANY error once returned to https:\/\/FQDN\/Citrix\/AADWeb post the AAD SAML login open a new browser tab in the same session and copy and paste the following URL https:\/\/FQDN\/Citrix\/StoreAuth\/SamlTest to see if you have any oblivious errors e.g<a href=\"mailto:user@domain.onmicrosoft.com\"> <\/a>user@domain.onmicrosoft.com from Azure AD which doesn&#8217;t map to the AD Shadow account that is user@domain so its a UPN mismatch and the sign-on will continue to fail.<br>2. If the employee can sign on to https:\/\/FQDN\/Citrix\/AADWeb and the Citrix vApp or vDesktop launches but they see a credential prompt with &#8220;<span style=\"text-decoration: underline;\">Other Use<\/span>r&#8221; check and see that you configured FAS for the correct Store with SAML Authentication setup and configured if not using my example of &#8220;<span style=\"text-decoration: underline;\">AAD<\/span>&#8221; as the Store setup and configured on StoreFront. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ICA Proxy Remote Access with Azure AD SAML<\/strong><br>Coming&#8230; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><strong>Concept\u00a0on Bring your own Identity (ByoI) Strengthening Security through Co-Shared\u00a0Responsibility owned by IT with different operating models<\/strong> <\/strong><br>Its a simple concept which I like and yes it adds in complexity but it times today its far better to harden against unwanted 3rd party access whilst making it harder to achieve  lateral movements. If the employee&#8217;s account is compromised by a 3rd party, they would need to compromise the employees identity in the cloud directory e.g AAD and in Active Directory (AD) on-premises as both passwords are completely different with different types of multi-factor authentication methods bound including access privileges. <\/p>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Conceptual Bring your own Identity (ByoI)- Strengthening <a href=\"https:\/\/twitter.com\/hashtag\/Security?src=hash&amp;ref_src=twsrc%5Etfw\">#Security<\/a> through Co-Shared Responsibility owned by IT with different operating models WITHOUT PASSWORD SYNCING. <a href=\"https:\/\/t.co\/8XLt0wM19U\">pic.twitter.com\/8XLt0wM19U<\/a><\/p>&mdash; Lyndon-Jon Martin \ud83d\udc68\ud83c\udffb\u200d\ud83d\udcbb (@lyndonjonmartin) <a href=\"https:\/\/twitter.com\/lyndonjonmartin\/status\/1303725170868314112?ref_src=twsrc%5Etfw\">September 9, 2020<\/a><\/blockquote> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><strong><em>The views expressed here are my own and do not necessarily reflect the views of Citrix<\/em><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Consider this an evergreen post as of 10\/06\/2020 IntroductionThe purpose of this blog post to aim for a consistent modern authentication experience for employees when consuming Citrix Virtual Apps &amp; Desktops (CVAD) + CVAD Service regardless of where the (CVAD) workloads are running, either in *Azure, *AWS, *GCP or *On-Premises. The primary priority is that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[568,504,683,1,1038,910,65,505,681,272,680,679,251],"tags":[1133,1134,933,1095,1135,1096,1068,1136,822,424,902,1138,1137,906],"class_list":["post-3767","post","type-post","status-publish","format-standard","hentry","category-apps-desktop-service","category-aws","category-azure","category-ctx","category-citrix-workspace-app","category-cta","category-data-centre","category-ec2","category-hybrid-cloud","category-iaas","category-private-cloud","category-public-cloud","category-security","tag-aad","tag-aad-saml","tag-azure-ad","tag-cvad","tag-cvad-1912-ltsr","tag-cvad-service","tag-employee-experience","tag-mfa","tag-saml","tag-security","tag-security-assertion-markup-language-saml","tag-single-sign-on","tag-sso","tag-virtual-smartcard"],"_links":{"self":[{"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/posts\/3767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/comments?post=3767"}],"version-history":[{"count":60,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/posts\/3767\/revisions"}],"predecessor-version":[{"id":3873,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/posts\/3767\/revisions\/3873"}],"wp:attachment":[{"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/media?parent=3767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/categories?post=3767"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/axendatacentre.com\/blog\/wp-json\/wp\/v2\/tags?post=3767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}