<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to migrate from LDAP authentication to Microsoft Azure Single Sign On with change of username? in Security</title>
    <link>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281741#M7574</link>
    <description>&lt;P&gt;Here's my story for others to follow and hopefully improve upon&lt;/P&gt;

&lt;P&gt;I mostly followed the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Security/HowSAMLSSOworks"&gt;Splunk docs to configure single sign-on&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;For doing a SAML group to Splunk role mapping, you need to use the AAD group IDs which you can get using the Powershell &lt;A href="https://msdn.microsoft.com/en-us/library/dn194130.aspx"&gt;Get-MsolGroup&lt;/A&gt; commandlet.&lt;/P&gt;

&lt;P&gt;I also put in the line &lt;CODE&gt;nameIdFormat = urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/CODE&gt; to the &lt;CODE&gt;[saml]&lt;/CODE&gt; stanza.  This means usernames will be the UPN rather than a horrible object ID.&lt;/P&gt;

&lt;P&gt;So I wrote a &lt;A href="https://gist.github.com/oxo42/5628c4c67d1067c5bd41c514411b7d35"&gt;migration script&lt;/A&gt; to do the migration which requires &lt;A href="http://csvkit.readthedocs.io/en/0.9.1/scripts/csvcut.html"&gt;csvcut&lt;/A&gt;.  I have a lookup file in my splunk instance already, built daily using an ldap search which is where the &lt;CODE&gt;sAMAccountName&lt;/CODE&gt; to &lt;CODE&gt;userPrincipalName&lt;/CODE&gt; mapping comes from.&lt;/P&gt;

&lt;P&gt;The script does the following:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Rename the users directory&lt;/LI&gt;
&lt;LI&gt;Do an in-place sed to change ownership of all public objects&lt;/LI&gt;
&lt;LI&gt;Build a file of new users to insert into &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Admin/Authenticationconf"&gt;authentication.conf&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Saved searches require an existing user to run (else they are orphaned).  With Azure AD as an identity provider, Splunk needs to create a &lt;EM&gt;cache&lt;/EM&gt;, so to speak, of users.  It does this by putting a &lt;CODE&gt;username = list;of;roles&lt;/CODE&gt; into &lt;CODE&gt;authentication.conf&lt;/CODE&gt; under the stanza &lt;CODE&gt;[userToRoleMap_SAML]&lt;/CODE&gt; when a user first logs in.  I want all scheduled searches to run, so whenever a public knowledge object is found, I add that user to the new-auths file.  Then I imported it into the authentication.conf file manually as a seed.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2016 10:42:45 GMT</pubDate>
    <dc:creator>joxley</dc:creator>
    <dc:date>2016-06-30T10:42:45Z</dc:date>
    <item>
      <title>How to migrate from LDAP authentication to Microsoft Azure Single Sign On with change of username?</title>
      <link>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281739#M7572</link>
      <description>&lt;P&gt;I want to migrate from LDAP Authentication to Microsoft Azure AD Single Sign On.&lt;/P&gt;

&lt;P&gt;I currently have LDAP authentication set up with my active directory domain using the &lt;CODE&gt;sAMAccountName&lt;/CODE&gt; as the login field.  This means that I log into Splunk with the username &lt;CODE&gt;john&lt;/CODE&gt;.  With the release of Splunk 6.4.0 and SSO with Azure AD, I want to move to that.&lt;/P&gt;

&lt;P&gt;I have figured out how to use the email address as the username by setting the &lt;CODE&gt;nameIdFormat&lt;/CODE&gt; field in &lt;CODE&gt;authentication.conf&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Migration Plan&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Move each folder in &lt;CODE&gt;/etc/users/$sAMAccountName&lt;/CODE&gt; to &lt;CODE&gt;/etc/users/$emailAddress&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;For each user do a recursive &lt;CODE&gt;sed s/$sAMAccountName/$emailAddress/&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Switch to SSO and map roles (which I've already prepared on a dev server)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I foresee an issue with this.  When I change the authentication to SSO, there will be no users on the system.  Users will only be created on first login.  Does this mean that all the scheduled searches won't run until that specific user logs in?&lt;/P&gt;

&lt;P&gt;Should I create a &lt;EM&gt;scheduled search&lt;/EM&gt; user specifically for this reason and set it up beforehand?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Additional Questions&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Should I leave &lt;CODE&gt;/etc/users/*/*/history&lt;/CODE&gt; out of the  set command?&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Does the history matter that much?&lt;/LI&gt;
&lt;LI&gt;What else have I forgotten?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 12 Apr 2016 10:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281739#M7572</guid>
      <dc:creator>joxley</dc:creator>
      <dc:date>2016-04-12T10:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate from LDAP authentication to Microsoft Azure Single Sign On with change of username?</title>
      <link>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281740#M7573</link>
      <description>&lt;P&gt;I think you're right on with your thought process.  However I fell that by creating the '/etc/users/emailAddy' folders you're effectively creating users in the "sSo world" so that once SSO is enabled users will exist and their saved searches will be fine.  I say go forth and write the manual for all those who will follow!!!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 23:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281740#M7573</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-12T23:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate from LDAP authentication to Microsoft Azure Single Sign On with change of username?</title>
      <link>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281741#M7574</link>
      <description>&lt;P&gt;Here's my story for others to follow and hopefully improve upon&lt;/P&gt;

&lt;P&gt;I mostly followed the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Security/HowSAMLSSOworks"&gt;Splunk docs to configure single sign-on&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;For doing a SAML group to Splunk role mapping, you need to use the AAD group IDs which you can get using the Powershell &lt;A href="https://msdn.microsoft.com/en-us/library/dn194130.aspx"&gt;Get-MsolGroup&lt;/A&gt; commandlet.&lt;/P&gt;

&lt;P&gt;I also put in the line &lt;CODE&gt;nameIdFormat = urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/CODE&gt; to the &lt;CODE&gt;[saml]&lt;/CODE&gt; stanza.  This means usernames will be the UPN rather than a horrible object ID.&lt;/P&gt;

&lt;P&gt;So I wrote a &lt;A href="https://gist.github.com/oxo42/5628c4c67d1067c5bd41c514411b7d35"&gt;migration script&lt;/A&gt; to do the migration which requires &lt;A href="http://csvkit.readthedocs.io/en/0.9.1/scripts/csvcut.html"&gt;csvcut&lt;/A&gt;.  I have a lookup file in my splunk instance already, built daily using an ldap search which is where the &lt;CODE&gt;sAMAccountName&lt;/CODE&gt; to &lt;CODE&gt;userPrincipalName&lt;/CODE&gt; mapping comes from.&lt;/P&gt;

&lt;P&gt;The script does the following:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Rename the users directory&lt;/LI&gt;
&lt;LI&gt;Do an in-place sed to change ownership of all public objects&lt;/LI&gt;
&lt;LI&gt;Build a file of new users to insert into &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Admin/Authenticationconf"&gt;authentication.conf&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Saved searches require an existing user to run (else they are orphaned).  With Azure AD as an identity provider, Splunk needs to create a &lt;EM&gt;cache&lt;/EM&gt;, so to speak, of users.  It does this by putting a &lt;CODE&gt;username = list;of;roles&lt;/CODE&gt; into &lt;CODE&gt;authentication.conf&lt;/CODE&gt; under the stanza &lt;CODE&gt;[userToRoleMap_SAML]&lt;/CODE&gt; when a user first logs in.  I want all scheduled searches to run, so whenever a public knowledge object is found, I add that user to the new-auths file.  Then I imported it into the authentication.conf file manually as a seed.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 10:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281741#M7574</guid>
      <dc:creator>joxley</dc:creator>
      <dc:date>2016-06-30T10:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate from LDAP authentication to Microsoft Azure Single Sign On with change of username?</title>
      <link>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281742#M7575</link>
      <description>&lt;P&gt;How did you transfer ownership of existing items (dashboards, reports, alerts etc) from LDAP users to AzureAD users?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 16:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-migrate-from-LDAP-authentication-to-Microsoft-Azure/m-p/281742#M7575</guid>
      <dc:creator>jthairu_splunk</dc:creator>
      <dc:date>2018-03-29T16:43:26Z</dc:date>
    </item>
  </channel>
</rss>

