COU-635 - Could not authenticate user between two sites

Created by Eric Frost 11 Oct 2017, 12:31:31 Updated by jonathan roberts 13 Apr 2018, 11:19:29

Setting 2 local installations of Umbraco 7.7.2 and installing Courier version 3.1.4 through the developer section, and trying to deploy a content node does not work.

What did you do?

  • Used IIS manager to set up to sites called source.localhost and target.localhost.
  • On each server I installed Umbraco version 7.7.2 and Courier version 3.1.4. I installed the Starter Kit 1.0.2 as well.
  • After the installation of Courier was completed I added the location for each installation, source.localhost and target.localhost, in the Courier screen.
  • I Made sure that the path was correct by going to the courier.config file and checked on the repositories.

Source courier.config: http://target.localhost 0

Target courier.config: http://source.localhost 0

Next I wanted to deploy some content. Navigated to the content section, create a new blog item named Blog 1 with the page title Blog 1. After saving and publishing it I right clicked on Blog 1, in my source installation, and pressed on Courier.

What did you expect to happen? I expected that the single piece of content that was highlighted was deploy to my target.localhost installation.

What actually happened? I was met this error:

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.Core.Exceptions.UnauthorizedClientException: User: efr@umbraco.com could not be authenticated at Umbraco.Courier.RepositoryProviders.WebserviceProvider.Security.SecurityHelper.ValidateUser(String login, String password) at Umbraco.Courier.RepositoryProviders.WebserviceProvider.Security.Authentication.AuthorizeByCredentials(String login, String password, Boolean cacheAuthResult) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeAndLog(String memberName) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.CloseSession(String sessionKey) --- End of inner exception stack trace --- at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.CloseSession(String sessionKey) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose(Boolean disposing) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose() at Umbraco.Courier.Core.Repository.Dispose(Boolean disposing) at Umbraco.Courier.Core.Repository.Dispose() at Umbraco.Courier.UI.Dialogs.CommitItem.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have tried to resolve the issue with the following:

Hashed and Clear Did not work.

I have check if the user exist in the database to see if the user ID might be wrong. It is not.

Attached are screenshot of the issue and courier logs.

I have tried with version 3.1.5 release from the nightly builds at here: http://nightly.umbraco.org/?container=umbraco-courier-release Same Error

5 Attachments

Download CourierTraceLog.txt

Download UmbracoTraceLog.LAPTOP-QN9MB39V.txt

Comments

Sofie Toft 14 Nov 2017, 13:18:04

I am currently running in to the same issues with versions: Umbraco 7.7.4 Courier 3.1.6

I'm getting the following error:

Server was unable to process request. ---> User: stk@umbraco.com could not be authenticated

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> User: stk@umbraco.com could not be authenticated at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Umbraco.Courier.RepositoryProviders.WebServiceProvider.RepositoryWebservice.GetAvailableRevisions() at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.GetAvailableRevisions() at Umbraco.Courier.UI.Pages.editRepository.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I've tried both with two localhost sites, and with two hosted sites

Additional details: I'm installing Courier as a package from the Umbraco backoffice I've tried using an API key in courier.config on both sites


Milos Jeremic 15 Nov 2017, 22:32:38

I am experience the same problem also. Starting from the scratch, credentials on both web sites are correct, but throws the same error. Umbraco 7.7.6" Courier 3.1.5

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.Core.Exceptions.UnauthorizedClientException: User: <my_backoffice_user> could not be authenticated at Umbraco.Courier.RepositoryProviders.WebserviceProvider.Security.SecurityHelper.ValidateUser(String login, String password) at Umbraco.Courier.RepositoryProviders.WebserviceProvider.Security.Authentication.AuthorizeByCredentials(String login, String password, Boolean cacheAuthResult) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeByCredentials(String username, String password) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeAndLog(String memberName) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.GetAvailableRevisions(String username, String password) --- End of inner exception stack trace ---


Dennis Aaen 11 Jan 2018, 13:59:45

We had a client today that managed to get this to work by doing the following:

Changed the legacy to true. as described here. http://issues.umbraco.org/issue/COU-104

Then changed the password for both emails on both sites but didn’t change the password in db for the second site.

Then went to the DB on the second site and updated the hashed password manually.

This resolved the issue.


Gareth Evans 14 Jan 2018, 19:18:41

Sounds like this might be useful https://shazwazza.com/post/umbraco-passwords-and-aspnet-machine-keys


Barb Romito 20 Feb 2018, 16:49:14

We came across this same issue after changing the PW for user (0). Solution: We manually updated the PW for each instance in the DB. Hopefully, this will be addressed with a future Umbraco release.


Sofie Toft 21 Feb 2018, 10:52:17

To get Courier working between two environments you need to add a Courier API key to the /Config/courier.config file.

In the <security> section, replace this section:

<auth>
  <method>credentials</method>
  <apikey></apikey>
</auth>

With this:

<auth>
   <method>token</method>
   <apikey>1234567890</apikey>
</auth>

The API key should be a randomly generated string with at least 10 characters. It's important that you use the same API key on all environments where you want to use Courier.


Sofie Toft 22 Feb 2018, 08:15:40

Have a look at this article about how to install and configure Courier: https://our.umbraco.org/documentation/Add-ons/UmbracoCourier/Architecture/Installation


jonathan roberts 13 Apr 2018, 11:19:29

Any idea how to configure the Courier section in the CMS for running between 2 local sites - such as users on both site and what the repository credentials should be on both sites? I have read the article above but it doesnt tell you how to set up the CMS


Priority: Show-stopper

Type: Bug

State: Submitted

Assignee:

Difficulty:

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 3.1.4, 3.1.5, 3.1.6

Due in version:

Sprint:

Story Points:

Cycle: