<?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 Copying SDE credentials from ArcGIS Server Datastores into MXD in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copying-sde-credentials-from-arcgis-server/m-p/26346#M1967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to determine if this is just a dead-end of an approach.&amp;nbsp; I have a fairly convoluted deployment workflow whereby various actors test a given MXD and deploy to varied AGS servers.&amp;nbsp; As the trustee of the MXD I have little direct control over these resources though I can make suggestions.&amp;nbsp; One approach which has worked okay with registered folders is to have a common AGS data store name that everyone agrees represents a project's data source.&amp;nbsp; Each AGS server can set this up as needed under the rubric of that name.&amp;nbsp; Then I have an ArcPy deployment script that I provide to these folks that (via an administrator connection) reads the data store publisher folder location and swaps the correct folder path in the MXD before deploying to AGS.&amp;nbsp; This works okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally it would be grand to do the same with SDE connections.&amp;nbsp; However as one might expect the management of the passwords is the issue.&amp;nbsp; As the AGS administrator, one can run arcpy.ListDataStoreItems and get the SDE credentials for a given data store (only interested here in publisher).&amp;nbsp; But the password is returned as "ENCRYPTED_PASSWORD".&amp;nbsp; In the current security model for 10.2.2 is there any arcpy method whereby I can take that encrypted password and create a new SDE connection with it to then install into a MXD? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using arcpy.CreateArcSDEConnectionFile_management it wants the clear text version of the password and not the encrypted text string.&amp;nbsp; Is there a way to provide this method the encrypted string or am I just going off into dodgy security territory?&amp;nbsp; I have no need of the actual password itself but I suppose I am moving the credential out of AGS and into the MXD (just for the deployment) and I can see that might be a tad insecure.&amp;nbsp; However, as this is run through an AGS administrator connection I would think that is within my scope. I am not quite sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any feedback would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2014 13:00:46 GMT</pubDate>
    <dc:creator>PaulDziemiela</dc:creator>
    <dc:date>2014-12-04T13:00:46Z</dc:date>
    <item>
      <title>Copying SDE credentials from ArcGIS Server Datastores into MXD</title>
      <link>https://community.esri.com/t5/python-questions/copying-sde-credentials-from-arcgis-server/m-p/26346#M1967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to determine if this is just a dead-end of an approach.&amp;nbsp; I have a fairly convoluted deployment workflow whereby various actors test a given MXD and deploy to varied AGS servers.&amp;nbsp; As the trustee of the MXD I have little direct control over these resources though I can make suggestions.&amp;nbsp; One approach which has worked okay with registered folders is to have a common AGS data store name that everyone agrees represents a project's data source.&amp;nbsp; Each AGS server can set this up as needed under the rubric of that name.&amp;nbsp; Then I have an ArcPy deployment script that I provide to these folks that (via an administrator connection) reads the data store publisher folder location and swaps the correct folder path in the MXD before deploying to AGS.&amp;nbsp; This works okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally it would be grand to do the same with SDE connections.&amp;nbsp; However as one might expect the management of the passwords is the issue.&amp;nbsp; As the AGS administrator, one can run arcpy.ListDataStoreItems and get the SDE credentials for a given data store (only interested here in publisher).&amp;nbsp; But the password is returned as "ENCRYPTED_PASSWORD".&amp;nbsp; In the current security model for 10.2.2 is there any arcpy method whereby I can take that encrypted password and create a new SDE connection with it to then install into a MXD? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using arcpy.CreateArcSDEConnectionFile_management it wants the clear text version of the password and not the encrypted text string.&amp;nbsp; Is there a way to provide this method the encrypted string or am I just going off into dodgy security territory?&amp;nbsp; I have no need of the actual password itself but I suppose I am moving the credential out of AGS and into the MXD (just for the deployment) and I can see that might be a tad insecure.&amp;nbsp; However, as this is run through an AGS administrator connection I would think that is within my scope. I am not quite sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any feedback would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 13:00:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-sde-credentials-from-arcgis-server/m-p/26346#M1967</guid>
      <dc:creator>PaulDziemiela</dc:creator>
      <dc:date>2014-12-04T13:00:46Z</dc:date>
    </item>
  </channel>
</rss>

