I'm trying to update the ArcGIS Server Security source of users and roles using the arcgis/admin/security/config/updateIdentityStore web service over Python, but I'm getting the error message "Failed to update the identity store configuration. One or more server machines could not be updated with new user or role store configurations". Going into the GUI, it appears like things get saved correctly, but I can't get into the roles using the credentials.
def updateIdentityStore(token, serverName, serverPort):
securityProperties = dict(adminUserPassword = 'MY
securitySettings = dict(type = "WINDOWS", properties = securityProperties)
securitySettingsJSON = json.dumps(securitySettings)
createNewSiteURL = "/arcgis/admin/security/config/updateIdentityStore"
params = urllib.urlencode({'token': token, 'userStoreConfig':securitySettingsJSON, 'roleStoreConfig':securitySettingsJSON, 'f': 'json'})
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
httpConn = httplib.HTTPConnection(serverName, serverPort)
httpConn.request("POST", createNewSiteURL, params, headers)
response = httpConn.getresponse()
if (response.status != 200):
httpConn.close()
print "Error while creating the site."
return
else:
data = response.read()
httpConn.close()
if not assertJsonSuccess(data):
print "Error returned by operation. " + str(data)
else:
print "Security updated successfully"
return