AnsweredAssumed Answered

Failed to update the identity store configuration. One or more server machines could not be updated with new user or role store configurations

Question asked by rayterrill on Oct 11, 2016
Latest reply on Oct 13, 2016 by PMcNeilly-esristaff

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#DOMAIN#PASSWORD', adminUser = u'MYDOMAIN\MYDOMAINUSERNAME', domainControllerAddress = "MYDCIPADDRESS")
    securitySettings = dict(type = "WINDOWS", properties = securityProperties)
    # Serialize directory information to JSON   
    securitySettingsJSON = json.dumps(securitySettings)
    # Construct URL to create a new site
    createNewSiteURL = "/arcgis/admin/security/config/updateIdentityStore"
    # Set up parameters for the request
    params = urllib.urlencode({'token': token, 'userStoreConfig':securitySettingsJSON, 'roleStoreConfig':securitySettingsJSON, 'f': 'json'})
    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
    # Connect to URL and post parameters   
    httpConn = httplib.HTTPConnection(serverName, serverPort)
    httpConn.request("POST", createNewSiteURL, params, headers)
    # Read response
    response = httpConn.getresponse()
    if (response.status != 200):
        httpConn.close()
        print "Error while creating the site."
        return
    else:
        data = response.read()
        httpConn.close()
        # Check that data returned is not an error object
        if not assertJsonSuccess(data):         
            print "Error returned by operation. " + str(data)
        else:
            print "Security updated successfully"
        return

 

Outcomes