0

I have installed a brand new, vanilla version of Sitecore 10.2, using Docker Desktop containers.

My Identity URL (which works) is https://xp0id.localhost. My CM Url (which works) is https://xp0cm.localhost.

I can log into Sitecore with no problem.

I have installed the Sitecore CLI following the instructions here. enter image description here

I am trying to log into Sitecore and getting the following error message:

"Endpoint belongs to a different authority: https://XP0id.localhost/.well-known/openid-configuration/jwks" enter image description here

The openid-configuration appears correct:

{"issuer":"https://xp0id.localhost","jwks_uri":"https://XP0id.localhost/.well-known/openid-configuration/jwks","authorization_endpoint":"https://XP0id.localhost/connect/authorize","token_endpoint":"https://XP0id.localhost/connect/token","userinfo_endpoint":"https://XP0id.localhost/connect/userinfo","end_session_endpoint":"https://XP0id.localhost/connect/endsession","check_session_iframe":"https://XP0id.localhost/connect/checksession","revocation_endpoint":"https://XP0id.localhost/connect/revocation","introspection_endpoint":"https://XP0id.localhost/connect/introspect","device_authorization_endpoint":"https://XP0id.localhost/connect/deviceauthorization","frontchannel_logout_supported":true,"frontchannel_logout_session_supported":true,"backchannel_logout_supported":true,"backchannel_logout_session_supported":true,"scopes_supported":["openid","profile","email","sitecore.profile","sitecore.profile.api","offline_access"],"claims_supported":["sub","name","family_name","given_name","middle_name","nickname","preferred_username","profile","picture","website","gender","birthdate","zoneinfo","locale","updated_at","email","email_verified","role","http://www.sitecore.net/identity/claims/isAdmin","http://www.sitecore.net/identity/claims/originalIssuer"],"grant_types_supported":["authorization_code","client_credentials","refresh_token","implicit","password","urn:ietf:params:oauth:grant-type:device_code"],"response_types_supported":["code","token","id_token","id_token token","code id_token","code token","code id_token token"],"response_modes_supported":["form_post","query","fragment"],"token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","private_key_jwt"],"id_token_signing_alg_values_supported":["RS256"],"subject_types_supported":["public"],"code_challenge_methods_supported":["plain","S256"],"request_parameter_supported":true}

I've validated the the ClientSecret is the same on both CM and ID server environment variables.

How do I get past this?

EDIT 1: Chet requested in the comments that I add the variables for the IdentityServer host config. These are run as docker containers, and those variables are set via environment variables.

CM Environment Variables (not all, just the related ones):

Sitecore_ConnectionStrings_SitecoreIdentity.Secret=vO1NgeC4l3DbbTm1pzh3DqelL8VHofYf6E6nu4AcqdJaEOmkgvPh5tKpy4Q0vXng Sitecore_ConnectionStrings_Solr.Search=http://solr:8983/solr;solrCloud=true Sitecore_ConnectionStrings_Web=Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=sa;Password=Password12345 Sitecore_ConnectionStrings_XConnect.Collection=http://xconnect Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client=http://xconnect Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client=http://xconnect Sitecore_ConnectionStrings_Xdb.Processing.Pools=Data Source=mssql;Initial Catalog=Sitecore.Processing.pools;User ID=sa;P assword=Password12345 Sitecore_ConnectionStrings_Xdb.Processing.Tasks=Data Source=mssql;Initial Catalog=Sitecore.Processing.tasks;User ID=sa;P assword=Password12345 Sitecore_ConnectionStrings_Xdb.Referencedata=Data Source=mssql;Initial Catalog=Sitecore.Referencedata;User ID=sa;Passwor d=Password12345 Sitecore_ConnectionStrings_Xdb.ReferenceData.Client=http://xconnect Sitecore_Identity_Server_Authority=https://XP0id.localhost Sitecore_Identity_Server_CallbackAuthority=https://XP0cm.localhost Sitecore_Identity_Server_InternalAuthority=http://id Sitecore_Identity_Server_Require_Https=false

Identity Server Environment Vars:

Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword=7dkHdsNp40mZ Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1=https://XP0cm.localhost Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1=vO1NgeC4l3DbbTm1pzh3DqelL8VHofY f6E6nu4AcqdJaEOmkgvPh5tKpy4Q0vXng Sitecore_Sitecore__IdentityServer__PublicOrigin=https://XP0id.localhost Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString=Data Source=mssql;Initial Catalog=Sitecor e.Core;User ID=sa;Password=Password12345

EDIT 2: Also adding content of file requested: enter image description here

EDIT 3: Here is the same file from the production folder: enter image description here

EDIT 4: Sitecore 10.2 Install Guide where Topology was suggested to be all caps. I used "XP0" for my compose-init. enter image description here

EDIT 5: Trying different case: enter image description here

8
  • The allowed clients are defined in the Config\Sitecore.IdentityServer.Host.xml file. It would be helpful if you could share the contents of this file. More detail here: doc.sitecore.com/xp/en/developers/102/… Apr 28, 2022 at 14:58
  • Sure, these are run as docker containers, so all of those variables are set as environment variables. But yes, let me add those environment variables.s Apr 28, 2022 at 15:00
  • 1
    Two things: I do see that your environment variables are showing the topology prefix in all caps ‘XP0’ but your examples are showing lowercase. Probably not an issue, but thought I’d call it out. Apr 28, 2022 at 15:10
  • Is there a space in one of the ID server environment variables? ‘AllowedCorsOriginsGroup1=XP0cm.lo calhost’ Apr 28, 2022 at 15:11
  • 1
    @ChetCheeto Thing 2: Not a space, that was a copy/paste error from terminal to stack exchange. Sorry about that. Apr 28, 2022 at 15:18

1 Answer 1

2

One of the comments questioned the casing of the topology. In trying to figure this out, I decided to burn down the docker implementation and start over from scratch.

Instead of using -Topology "XP0", I used -Topology "xp0"in the compose-init command when installing Sitecore.

This ended up fixing the issue with the Sitecore CLI login.

1
  • 1
    Kinda nice being able to tear down an environment and spin it back up in a few minutes :) Apr 28, 2022 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.