code #

Extended SSO for Discourse with IdentityServer3

Background In our business we operate a number of customer-facing web services which use an IdentityServer3 identity provider as the single source of identity. We have customised our setup to allow two sources of federated identity, and to pull certain claims from our CRM. We have a new requirement to integrate a hosted instance of the excellent Discourse discussion forum, also using the same single source of identity. Discourse does not support OpenId Connect, rather its own particular form of SSO.

A weirdness with xunit

Today was rebuilding a solution that had been updated to xunit2, and kept getting random test failures, usually with some kind of conflict with Rhino Mocks. The fix seemed to be to turn off the parallel testing. A little googling turned up this which suggests Rhino Mocks does indeed have a problem in a multi-threaded test environment

CRM plugin hard won learnings

If you need to use ILMerge, you must use an unencrypted strong name key for your assembly If you change the strong name key for your assembly, CRM thinks it’s a whole new assembly, so it might pay to create new ones explicitly If you are now including the generated CRM early-bound classes through ILMerge instead of as a source include, remember to add [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] to all deployed assemblies