Skip to main content

Posts

Part 2: Keycloak Integration with Sitecore

Part 2: Keycloak Integration with Sitecore This blog will cover the process of setting up Keycloak with Sitecore content management, building upon the explanation provided in the Part 1 blog on Keycloak Integration with Sitecore . Step 1: Configure OpenID Connect Create a pipeline processor to configure OpenID connect to talk to Keycloak identity providers. public class KeycloakIdentityProvider : IdentityProvidersProcessor { protected override string IdentityProviderName => "keycloak"; private string ClientId => Settings.GetSetting(KeycloakSettings.ClientId, ""); private string ClientSecret => Settings.GetSetting(KeycloakSettings.ClientSecret, ""); private string Authority => Settings.GetSetting(KeycloakSettings.Authority, ""); private string MetadataAddress => Settings.GetSetting(KeycloakSettings.MetadataAddress, ""); private string RedirectURL => Settings.GetSetting(Ke...

Create a Custom Page View Event for Interactions

Create a custom page view event for interactions Once the user visit with the website, Sitecore creates new contact into "[website_Xdb.Collection.Shard0].[xdb_collection].[Contacts]" or "[website_Xdb.Collection.Shard1].[xdb_collection].[Contacts]". Contact could be known or unknown.  When the user will interact with the website all interactions will be saved into "[website_Xdb.Collection.Shard0].[xdb_collection].[Interactions]" or "[website_Xdb.Collection.Shard1].[xdb_collection].[Interactions]" for particular contact as you can see ContactId in Interactions table. For each interaction, it is mandatory to have one event. All events you can see in the "Events" field inside the interaction table in JSON format. In the event JSON, out of the box, the page view event looks like the below JSON: In this case, if you want to create your custom PageViewEvent and want to add more fields then you can follow the below steps: Create a Custom Facet ...

Part 1: Keycloak Integration with Sitecore

Part 1: Keycloak Integration with Sitecore Application security is more important on day to day basis, access management(IAM) tools ensure that only authorized individuals can access the necessary resources, while unauthorized users are denied entry. This helps protect sensitive information, prevent data breaches, and maintain regulatory compliance. What is a Keycloak? Keycloak is an identity and access management(IAM) tool. Keycloak is an open-source tool having a license of Apache license 2.0. Keycloak empowers you to swiftly secure services while minimizing time requirements and seamlessly incorporating authentication into applications. Keycloak Features SSO : Keycloak fully enables both Single Sign-On and Single Sign-Out functionalities. Admin Console :  Keycloak provides a user-friendly web-based GUI that simplifies the configuration process, allowing you to effortlessly customize your instance to align with your specific requirements. Multiple Protocols Support : Cu...

A connection was successfully established with the server, but then an error occurred during the login process.

 While I was installing Sitecore 10.1.2 XP01, I was getting this error " A connection was successfully established with the server, but then an error occurred during the login process". Install-SitecoreConfiguration : A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) At C:\Swati\Sitecore\Sitecore 10.1.2 rev. 006578 (WDP XP1 packages)\XP1-SingleDeveloper.ps1:152 char:1 + Install-SitecoreConfiguration @XP1Parameters *>&1 | Tee-Object XP1-Si ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration [TIME] 00:02:21 Invoke-Sqlcmd : A connection was successfully established with the ...

Sitecore Messaging Framework

  Sitecore Messaging Framework Recently I have implemented Sitecore Message Framework. Hopefully, it will be helpful for you. Scenario: I had a scenario where I was using a scaled environment and I wanted to save some data on the master DB from content delivery. As you know content delivery can access Core and Web Db and it cannot access master DB so to achieve this functionality I have used Sitecore Messaging Framework. What is a Sitecore Messaging Framework? Sitecore Messaging was introduced in Sitecore 9.0.1 version (Only SQL Transport). It supports message-based communication in Sitecore.  It is part of the XP, not part of the XM configuration. It wraps up the Rebus library. Please install the following libraries Sitecore.Framework.Messaging.Abstractions Sitecore.Framework.Messaging.Configuration Below are the steps: You need to create a configuration file for the bus which you need to copy to CM and CD. Then you need to create an empty class. Now you need to create a...

Sitecore 10.2 error: Failed to start service 'Sitecore Marketing Automation Engine Service"

Sitecore 10.2 error: Failed to start service 'Sitecore Marketing Automation Engine Service" I was facing an issue restarting "Sitecore Marketing Automation Engine Service" and getting the below error: Application: Sitecore.MAEngine.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException at Sitecore.XConnect.Client.XConnectClientConfiguration.CheckInitialized() at Sitecore.XConnect.Client.XConnectClientConfiguration.get_CurrentModel() at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(Microsoft.Extensions.DependencyInjection.ServiceLookup.FactoryCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Ext...