<?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: Arcpy Stop Services: need to hard code password?? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111745#M4394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But getpass prompts for credentials, yes?&amp;nbsp; And this process needs to be a nightly, automated process. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Dec 2014 19:56:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-12-18T19:56:03Z</dc:date>
    <item>
      <title>Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111743#M4392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to stop our ArcGIS Server web map services nightly, just before a scripted compression.&amp;nbsp; Reading the ArcGIS Server Administrator API documentation, it appears I would need to hard code the credentials of a user in the Publisher role in order to do it.&amp;nbsp; This is contrary to standard security protocols, and I am hoping someone might suggest an alternative or explain that I am mistaken in my understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 22:05:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111743#M4392</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-12-17T22:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111744#M4393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you look at this example: &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/"&gt;ArcGIS Help 10.1&lt;/A&gt; or &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt;&amp;nbsp; you can see that getpass is used to ask for the password.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 23:27:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111744#M4393</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-12-17T23:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111745#M4394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But getpass prompts for credentials, yes?&amp;nbsp; And this process needs to be a nightly, automated process. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 19:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111745#M4394</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-12-18T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111746#M4395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marianne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you read is correct, the credentials need to either be hardcoded in a variable or you can use the getpass method that Xander suggested but then you won't be able to automate. If you run the script from a local workstation within a non-shared folder that only you or a system admin could access, would that still violate your security protocols? I'm assuming you'll be running this script behind a firewall?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anytime you pass credentials into an automated script there will be some risk involved. I've worked with users in the past that take measures to protect the actual script file by putting it on a local folder with limited access. There are ways to encode the credentials within the script itself but the username/password are still exposed if opened. This probably isn't the answer you are looking for but I hope it helps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 21:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111746#M4395</guid>
      <dc:creator>AndyOmmen</dc:creator>
      <dc:date>2014-12-18T21:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111747#M4396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting, thanks!&amp;nbsp; This is the information I was looking for.&amp;nbsp; Typically, I would not run the script from a local workstation, but I can and likely will in this case.&amp;nbsp; Is there no way to call an ArcGIS Server connection file to perform the work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 21:12:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111747#M4396</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-12-18T21:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Stop Services: need to hard code password??</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111748#M4397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is a good suggestion (+1 for that). The alternative would be to use:&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/15956952/how-do-i-decrypt-using-hashlib-in-python" title="http://stackoverflow.com/questions/15956952/how-do-i-decrypt-using-hashlib-in-python"&gt;How do i decrypt using hashlib in python? - Stack Overflow&lt;/A&gt; &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;A href="https://pypi.python.org/pypi/simple-crypt" title="https://pypi.python.org/pypi/simple-crypt"&gt;simple-crypt 3.0.2 : Python Package Index&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then you would still store the encrypted password in a config file (which you can read with ConfigParser) and anyone with access to the code could still decrypt it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 00:11:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcpy-stop-services-need-to-hard-code-password/m-p/111748#M4397</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-12-19T00:11:47Z</dc:date>
    </item>
  </channel>
</rss>

