About Paul Urban

Experienced Architect with a demonstrated history of working in the information technology and services industry. Strong arts and design professional skilled in technical and strategic advisory, architecture and technical lead, development, business analyses and team management He is specialized in innovative solutions elaboration, agile methodology implementations and process analysis.

How to Restrict Access to Sitecore SXA Site with Identity Server

Let’s imagine that you need to restrict to secure your whole site, or only your Content Management instance. No anonymous access. As a Sitecore old school guy I tough about site requireLogin setting set to true and loginPage to /sitecore/login

From old Sitecore Developer Network

 

It changes with Sitecore 9.1 and Identity Server . A must read article, Understanding Sitecore authentication behavior changes,  says that the new format is  /identity/login/{your_sxa_site_name}/SitecoreIdentityServer. 

Continue reading

Sitecore SXA Personalization based on current environment

How many times you need a different content on different environment? For example, GTM script with different params on PROD and non-PROD environment? Why not leverage SXA Multisite Environment variable and Sitecore rules?

Perso

There are 3 steps.

First. In your web.config define local environment variable

<add key=”localenv:define” value=”local” /> i.e. different value for each environment : local, dev, qa, etc.

Second.  Set SXA setting XA.Foundation.Multisite.Environment on each environment

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:localenv="http://www.sitecore.net/xmlconfig/localenv/">
<sitecore >
<settings>
<setting name="XA.Foundation.Multisite.Environment" value="LOCAL" />
<setting name="XA.Foundation.Multisite.Environment" role:require="ContentManagement" localenv:require="development">
<patch:attribute name="value">DEV-CM</patch:attribute >
</setting>
<setting name="XA.Foundation.Multisite.Environment" role:require="ContentDelivery" localenv:require="development">
<patch:attribute name="value">DEV-CD</patch:attribute>
</setting>
<setting name="XA.Foundation.Multisite.Environment" role:require="ContentManagement" localenv:require="qa">
<patch:attribute name="value">QA-CM</patch:attribute>
</setting>
<setting name="XA.Foundation.Multisite.Environment" role:require="ContentDelivery" localenv:require="qa">
<patch:attribute name="value">QA-CD</patch:attribute>
</setting>
</settings>
</sitecore>
</configuration>

 

Third. Create a rule

using Microsoft.Extensions.DependencyInjection;
using Sitecore.DependencyInjection;
using Sitecore.Diagnostics;
using Sitecore.Rules;
using Sitecore.Rules.Conditions;
using Sitecore.XA.Foundation.Abstractions.Configuration;
using Sitecore.XA.Foundation.Multisite;

namespace OneWeb.Feature.Multisite.Conditions
{
 public class SxaEnvironmentRule<T>:StringOperatorCondition<T> where T : RuleContext
 {
  public string querystringvalue { get; set; }

  protected override bool Execute(T ruleContext)
  {
   Assert.ArgumentNotNull((object)ruleContext, nameof(ruleContext));
   if (string.IsNullOrEmpty(this.querystringvalue))
   {
    return false;
   }

   var multisiteConfigurationReader = ServiceLocator.ServiceProvider.GetService<IConfiguration<MultisiteConfiguration>>();
   var multisiteConfiguration = multisiteConfigurationReader?.GetConfiguration();

   if (multisiteConfiguration == null)
   {
    return false;
   }
   return this.Compare(multisiteConfiguration.MultisiteEnvironment, this.querystringvalue);
  }
 }
}

Universal Tracker

Sitecore in on a journey from monolith to NET Core based Service Architecture by leaving the safety of the monolith but because of tight coupling we have to live with large instances, slow start up and all or nothing upgrades. This old approach is hard to scale, bug in one feature can affect the whole platform. It always slowed down the adoption of new technologies.  Now, Sitecore is going into direction where they creating  a new building blocks on the same Sitecore Host (hOS+). One of them is Universal Tracker. But what is it ?

Universal Tracker is a headless API for xDB collection. You asking your self isn’t that xConnect? It is not. xConnect only accepts immutable history and it designed for trusted service communication – Authentication only, no authorization. Universal Tracker is needed to not expose xConnect. I has been told that in the future, Sitecore will use Universal Tracker instead of Sitecore.Analytics.Tracker. The Universal Tracker will allow collection of interaction data from all channels, wherever they may be, including Sitecore websites (web tracker), other websites (JS tracker) and even mobile applications (mobile tracker).

Where xConnect is concerned with collecting completed interactions, the universal tracker is concerned with collecting live interactions as they happen, and submit them to xConnect when they’re done.

Continue reading

Solr 6.6.2 exceptions while rebuilding large indexes

sitecore Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed

sitecore o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id

 

For last few weeks I was getting this exception while I was working on my local machine using a copy of production master and web databases. It never happened before, never with our dev databases synchronized by Unicorn.   Rebuild started normally, and then half an hour later I was getting an exception pointing into a random item saying that Sitecore is not able to write document ID.  Data corruption? But why is working on staging? No, the Java heap is running out of space.

By default heap size is  512 MBSolrDashboard

 

You can change it by uncommenting set  SOLR_JAVA_MEM  in solr.in.cmd file

SolrConfig

SolrDashboardAfter

 

Sitecore 9.1 Developer Installation

 

The Prerequisites for Sitecore 9.1 are known

  • Windows 2016 server or Windows 10
  • IIS 10.0
  • .Net Framework 4.7.1
  • SQL Server 2016 SP2 or  SQL Server 2017
  • SQL Server 2014 is compatible with the XM Scaled topology
  • Solr 7.2.1.
  • .Net Core 2.1 for the new Sitecore Identity server, you must install: ·
  • .Net Core 2.1 Runtime (v2.1.3)
  • Sitecore Install Framework 2.0.0

If  want to install and play with  Sitecore 9.1 while still working on 9.0.X project ?

  1. Install SIF 2.0 and keep 1.2.1 – you will need it for Sitecore 9.0.X. installation
  2. Install Solr  7.2.1 on a different port than  6.6.2 ( you will need both instances)

Enjoy!

login

Sitecore Symposium 2018 Takeaways

SCSYM2018_2018-Infographic_v3.26_RQ-01

Sitecore acquired Stylelabs

The Big surprise of the Symposium – Sitecore acquired  Innovative Content Marketing Software Vendor Stylelabs. The new platform centralizes the ability to define content strategy and easily create, manage, and publish marketing content across channels. Adding Stylelabs’ platform to Sitecore allows marketing teams to own the entire content lifecycle and understand the impact of specific content assets on individual customers’ behavior, empowering them to deliver transformative experiences throughout the customer journey.

NET Core based Service Architecture

Sitecore in on a journey from Monolith to NET Core based Service Architecture. They want to leave the safety of the monolith but because of tight coupling we have to live with large instances, slow start up and all or nothing upgrades. This old approach is hard to scale, bug in one feature can affect the whole platform. It always slowed down the adoption of new technologies.  Now, Sitecore is going into direction where they creating  a new building blocks on the same Sitecore Host (hOS+). First blocks: Sitecore Identity, Universal Tracker and soon Horizon.

Sitecore Identity

Support for Federated Authentication- – maybe some people who worked with Commerce already know a little about it. Based on Identity Server 4 default login mechanism across the platform (Experience Manager, Experience Platform, Experience Commerce) Provides Single Sign On using standard authentication protocols combine with external AIM systems, but still compatible with old Membership

Universal Tracker

Headless API for xDB collection. You asking your self isn’t that xConnect? It is not. xConnect only accepts immutable history and it designed for trusted service communication – Authentication only, no authorization. We need Universal Tracker to not expose xConnect. I has been told that in the future, Sitecore will use Universal Tracker instead of Sitecore.Analytics.Tracker. BTW, with Sitecore 9.1 Xamarin API has been updated. Link to my post about Universal Tracker

Horizon

Next generation experience manager. it will reduce time to value significantly with focus on the need of tomorrow user profiles. Out of the box features for easy adoption and utilization of the full Sitecore potential. Providing a user interface that is just as powerful and innovative as the engine behind.

Sitecore Headless

  • Sitecore SSC Web API
  • Sitecore Experience Accelerator Data Modelling and JSON Rendering
  • Sitecore JavaScript Services
  • Commerce services are supported through an API and accessed through JSS

Sitecore Headless for Agencies and JavaScript Developers

Sitecore Cortex machine learning

Content tagging, automated personalization recommendation and flexible integration with other ML engines and algorithms.

ML

Sitecore Cortex automates the task of content tagging for bout internal and external search and creates information taxonomies used to provide better SEO rankings, content experience and search results on your website. Sitecore Cortex uses a configurable provider framework for content tagging which allows to bring your own Natural Language Provider.

Sitecore Experience Accelerator

New wire-framing for rapid page design and layout

  • Creation of WCAG 2.0 compatible websites
  • Wireframe and graysacle Modes
  • Cross-site linking
  • Per-site views
  • Rendering variant component embedding

I remember Adam Najmanowicz commitment to fix existing bugs submitted by Sitecore user over new features. A lot of people confirmed that SXA team responsiveness is impressive.

 

Sitecore Forms

Forms has some existing new features such as conditional and pre-filling of fields. Pre-filling allows to set a data-provider for a field and pre-fill that field with data. Conditions allows to build forms that respond to user input and only show relevant questions.

EXM and Marketing Automation

Commerce focused email improvements

Simplified Deployment

XM Only Web Deploy Packages (WDPs) and a single machine setup template

SIF 2.0

Driven by requirement of 9.0 multi-role capable/ scaled deployment. On premises equivalent to cloud standardized on WebDeploy. What is new in 9.1? You need new Sitecore Installation Framework 2.0 to install 9.1. You have to keep the old module version to be able to install previous Sitecore version. At top of that here are few new features:

  • Developer workstation templates
  • Prerequisites install templates
  • Uninstall Support
  • Remote distributed deployment

XP Single Topology: Identity Server, xConnect, Sitecore

XM Scaled Topology: Identity Server, Content Management, Content Delivery

XP Scaled Topology: Content Management, Content Delivery, Processing, Reporting, Collection, Search, RefData, Automation, Automation Reporting, Cortex Processing, Cortex Reporting

Few of you will notice more server compared to 9.0. My suggestion. Start it like this, then delete what you don’t need or combine.

Enhancing the existing- Core platform

9.0.2 XM 9.1 XM only
Cold Start of CM to Launch Pad 31.63 16.63
Number of files in bin 529 296
Content Editor opened first time 24.01 4.21
Experience Editor open first time 4.82 3.01

 

Expanded Global Cloud Support

Azure Data Center support in US Gov, Korea, France and Germany

Sitecore compliance with GDPR- Part II

In my previous blog, I wrote about GDPR compliance at large. Let’s look more closely how should be done and how in Sitecore.

There are a lot of customization to do whatever which Sitecore version you are using.  Starting starting with Sitecore 8.2 Update 7  Sitecore provides few useful  tools.  Since this version has been release few weeks before May 25th deadline you may implement all by you own.

Options:

  • Upgrade to Sitecore 9
  • Upgrade to Sitecore 8.2 Update 2 released April 26th
  • Customize current implementation

Continue reading