Adding additional Sitecore Security Providers
Our production environment utilizes separate publishing instances of Sitecore. We were hoping to utilize those publishing servers to initially build our indexes prior to deploying Coveo to our active CMS server. One issue we have run into is dealing with the creation of the security providers.
Each publishing server has it's own Coveo Search Provider configuration. The SecurityProviderName and ServerUrl are unique to each publishing server. The Coveo Index Source Name is shared across all servers: "coveocoreindex [CMS Server Name]".
What we've found is the following:
- When initially creating the index from any of the servers, the security provider is created based on the host machine and the index is created with that security provider associated to it
- When trying to rebuild the same index from another server, where a security provider has not been created, we receive an error: "Job started: IndexUpdateIndexName=Coveocoreindex|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Sequence contains no matching element"
- If I then delete the coveocoreindex through the admin service, then try to rebuild the index from the other server; the security provider gets created, the index gets generated and I can now actually rebuild from either of the two servers without issue. (Now that both providers exist in CES)
Seeing as how the Security Provider/User Identity not being created is causing this issue, we tried manually creating a User Identity and associated Security Provider which matched the hosts that would be connecting to Coveo. However, when trying to add a User Identity following the same pattern generated in Coveo during an index rebuild, we receive the error "Your configuration is out of date." We also tried exporting an existing one, changing the host name in the export file, and re-importing. This resulted in the same "Your configuration is out of date" error.
The only way we have been able to get this to work is by updating each server, Publishing and CMS, then rebuilding a single index from each server until we have all servers Security Providers represented in Coveo.