Feed on
Posts
Comments

Sitecore and SSL

As a Solution Architect in Sitecore you often get request ‘howto do SSL in Sitecore’. Beside of our great Shared Source SSL module, you’ve to do something on configuring the network/OS level to register the certificate.

So what’s the general idea of SSL? You want to have certain pages to execute over an encrypted connection. The most feasible solution is SSL which encrypts the data by default using a 128bit encryption. Still pretty strong these days, although I won’t be surprised if we move to 256bit somewhere in 2010. There are several traditional vendors who deliver certificates. In the Netherlands for example KPN. All register their certificates at VeriSign, a party who does take care of the strength of the encryption and the validation of newly created certificates.

Afterwards you’ve to integrate it into Sitecore. A very simple solution is to decide per item if you want to run the constructed page on SSL or not. The Shared Source component takes care of that part.

Now the infrastructure / OS ‘issue’. It seems for a several reasons that running certificates on the web application software(IIS) is very expensive. Combining encryption with page rendering is always possible in every internet server(Apache, Tomcat, IIS, etc), but all have significant disadvantages when it comes to delivery.

I often suggest to rather use a network based solution. These days’ routers, load balancers and switches have the possibility to handle https/ssl for you. As these machines are designed for passing TCP/IP packages thru, they can easily encrypt them. Beside of that, when you run into out scaling scenarios, you don’t have to manage your certificates on multiple places.

Here’s a simple diagram:

SSL Executor

In this case the SSL Executor is a Reversed Proxy, but it can also be a firewall or other network interface.

Hope this helped. :)

Note: This is a post written out of my experience as an architect in many projects. I’m involved in general in Sitecore projects, but rarely I’ve got the opportunity to ‘work’ a little outside of this boxed environment. Often these high level problems arise in project where Sitecore is involved but also in other projects. It’s never my intention to blame a vendor, although I might point out some weaknesses.

Figured just out that when starting programs in my newly installed Windows 7 installation, I’m always searching for the name of the program. For those who are not familiar with ‘searching in the startmenu’, please have a look at the screenshot below and look particularly at the search box.

windows-7-start-menu

When I search for ‘Internet Explorer’ I’ll get my standard browser: IE. Searching for ‘Mozilla’ will return the browser I use for mail and feed reading(all Google).

Why am I searching for Internet Explorer or Mozilla, why not for ‘Browser’ or ‘Internet’? I can depend on the icon what to choose. It will safe me a bunch of irrelevant names to remember, but more important, it more intuitive. It will also get the discussion away from what kind of browser you’re using. Create a simple dialog which allows you to download a couple of browsers associated to it. It is more logical and less vendor specific. I think it will be the solution for the discussion bundling IE with Windows as well!

I’ve reinstalled my machine of last night with Windows 7. I’m very happy with this new platform! Thank you Microsoft. One of the final reasons to start yesterday was that my database integration in Visual Studio was broken. Of course there where many more reasons, but that was the issue which made me do it yesterday evening.

So far so good. This morning I started of with a clean and very fast machine. Visual Studio 2008 was ready to roll. I’ve installed the Developer Edition of VSTS yesterday eve.

Today I decided to spent a little bit of time on getting the Entity Framework to work for a small, highly data-driven portal I’ve to develop. One of the issues with the portal is that it should be ready by yesterday. Not so much pressure, but I wanted to be highly productive. Unfortunately I’m highly disappointed.

While we all still claim that simplistic data driven websites should be online in a couple of hours, the truth is the opposite. I’ve got an app where you’ve got users. Users can be in a WorkGroup and some of those these users are leaders of the group. In objects:

  • User.WorkGroups –> List<WorkGroup>
  • WorkGroup.Users –> List<User> –> All users associated, incl leaders.
  • WorkGroup.Leaders –> List<User> –> All leaders

In the database you’ll store this as 3 tables: User, WorkGroup and an AssociationTable with a property ‘IsLeader’ (bit).

The database design was easily made, as I told you before, I decided to use the Entity Framework. But somehow I was absolutely unable to get this to work. I could get the User <-> WorkGroup(many to many relation) to work, but the Leader-relation couldn’t be made without modifying the generated code(or maybe the XML?). 

I’m sure one of you guys will give me the solution how to get this to work. And once again absolutely sure that this is not impossible. But I’m in general wondering why I couldn’t figure this out during the 2 hour R&D I’ve spent on it. The designer doesn’t seem to support something like that. Or it is hidden, somewhere. I’m not sure if this is just a limitation of the Entity Framework or of many O/R mappers.

I do know I generally dislike my whole process. I’ve been switching over and over between the different designers for my entities and database. This makes me wondering. What if this is your daily task? Getting a model designed by business users(interpretation I), normalize this(interpretation II), fit this into an object design(interpretation III) and maybe redo some of these part during one of the stages.

Let’s look from a perspective of a developer. I do not care about the database. It should just be stored. I care about the way I can access the data, so I want to control the types in my entities. My illusion: create a model(we’ve got a language for that: UML). Hit a button, and code + database should be ready.

Optimizations for storage and in the data access code should be done by the generation. The computer is way smarter when it comes to optimizing, it can calc all data access roads and ask if I want to flag more often used data. When I want to create a specific method(for example: GetById) I can define it in OCL.

The solution seems to be so obvious. Why can’t I find such a tool? I can find database generation tools, I can find O/R mappers. I can even find frameworks which should be O/R mappers(isn’t the Entity Framework the framework to be?). But none of these support my vision.

What can I do know? I can use a CMS to store my relational data. All my relational data, maybe thousands of records. I’ve to find a way how to store it internally as CMS’s use all kind of structures, but never a relational one.

I’ll end up in this project using an heavily modified Sitecore installation with lots of custom code to get around the limitations(I’m able to write that quickly as you can imagine). But hopefully you’ve seen my point. I gives me a huge headache in this age of data generation, web service generation for out scaling, advanced cache structures, cloud computing, etc.

Do you got a solution in mind for me?

Note: This is a post written out of my experience as an architect in many projects. I’m involved in general in Sitecore projects, but rarely I’ve got the opportunity to ‘work’ a little outside of this boxed environment. Often these high level problems arise as well in project where Sitecore is involved. I won’t blame a vendor, but I’m wondering why we smart guys are not able to solve issues like productivity without doing concessions on the business requirements.

The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.

I wanted to be smart. I tried to use LINQ to XML for parsing an Atom feed. Here’s what I’ve got to read a link:

var urlElement = item.Elements(xmlns + "link")
                                .Where(link.Attribute("rel").Value == "alternate")
                                .Select(link => link.Attribute("href").Value)
                                .First();

Do you see the issues? 3 Nullpointers:

  1. Attribute “rel” in my Where
  2. Attribute “href” in my Select
  3. First() –> What if I have nothing to get the first of?

Once again this underlines what Edsger W. Dijkstra said in the quote written above. You try to be smart by using the latest stuff, coolest tools, etc. But the limitations are never described, you’ll only experience them while debugging.

Another lesson learned.

Small update: Those who are using Resharper will get notified about the first 2 nullpointers, but not about the third. On the other hand, solving that in the where clause doesn’t fix the value analysis (seems to be hard in lambda’s).

Sometimes when you’re updating item in hooks, you’ll receive strange error messages in the client. The reason for this is quite clear. Sitecore has an event system divided in 2 parts: the regular events such as item:created. The other one is the NotificationContext. This particular class is used by the Sitecore client to get notified before time intensive actions such as event broadcasting is done.
You can use this functionality as well by simply subscribing to the delegates in Sitecore.Context.Notifications.

But what if you’re updating or manipulating your repository triggered by a client action? Exactly, the client has subscribed to a specific action, but when the event will be triggered, a collection has changed or a DataContext is missing. The solution is easy: use Sitecore.Data.BulkUpdataContext in a using statement:

using(new Sitecore.Data.BulkUpdate())

{

//Your update code

}

Nobody gets notified, but important events(configured in the web.config/include files) will get triggered.

Have fun coding!

You can feel it everywhere! Lord of the Rings starts with these sentences.
So does my new project. I’m not going to reveal anything. But some parts might be interesting for you. On January 1st 2009, I’ll start of with a new website. This website is rather a project then just a single website. It all has to do with Web 2.0, Social Networking, but also Sitecore. It’s all about experiencing what goes around on the web these days. And how to take advantage of it.

On technical side: I’m developing a close integration of Sitecore with all kinds of social networks / web 2.0 services. When I’m talking about close, we’re talking this time about tight! Using Sitecore as data aggregator in several ways. But also a web 2.0  portal and main distribution channel.

Expect my sources to be published on our shared source repository somewhere February. When everything is stable.

More info upcoming later this week.

Sitecore is alive and kicking. A lot is happening internally on product development. New modules and integrations with technology partners get released at the same speed as Bugatti Veyrons get sold ;) . In new (even emerging) markets such as Australia, South Africa, Israel, Asia and New Zealand, Sitecore becomes the standard for Web Marketing.
Yeah that’s right: Web Marketing. More then ever Sitecore becomes a tool for the Marketers. Once again: yes, just the tool. IT grows up, we are more then often just the tool to reach goals. Information goals, conversion goals and even more physical commercial goals such as direct sale.

All of this doesn’t mean that Sitecore forgets where we came from. Very often Lars Fløe Nielsen and I have talks about the incredible number of developers who work with Sitecore, other Sitecore technical numbers like our implementations but also namespaces, classes and methods in our product(s). Both Lars and I are very proud when we look at Sitecore as a company. Almost 50% of our colleagues are involved in Product development. When I’m talking about involved, this doesn’t mean that they contribute code to the repository, but rather talk on a daily base about product directions. We supply our feedback, feeded by our outstanding power team of partners and customers, in a well formed way to product development. In this way there’s no way for them to find excuses for such another outstanding improvement in the product. We provide the exact reason, the pain and possible solution. Together with the right business case supplied by you out there, we’re able to remain world leading in innovative content management :) .

This morning in the train I’ve been thinking how to address some of the issues of our developer customer around the world. The guys who are writing and rewriting code on a daily base. A lot of you have made us famous inside your company. So we should listen to you guys as well. Like I said, we try to do this always, but sometimes, it’s good to trigger people. So please! go ahead, react on this post. Tell us what we should do better, what we should different, what’s working what not. I’m particular interested in what makes your process less time intensive and more efficient.
Should we come up with a Visio shape for designing your data? Or should we deliver you a templated WebControl for our advanced types? Is a part undocumented what should be documented? Please let me know.
But please note one thing: I’m looking for feedback, not for a flame war. This is my first try to do this. Hopefully we can start a dialogue more often.

So please go ahead!

This Thursday, Christian Daems is showing the world of Content Management and Internet Innovation in Bruxelles, Belgium. A real cool event.

Sitecore is one of the biggest sponsors of this event. I’ll be there together with some of my Danish colleagues and a handful of partners. Please drop by our boot when you want to get to know more about Sitecore. Or in case you want to share some thoughts with me.

Lars Nielsen, one of our Vice Presidents, is opening this event as a keynote speaker.

Hope to see you there!

At Sitecore we have upgraded our site to version 6. Because of our tightly integration with background systems it took a little moment. But finally we’re there.

As we’ve got 20+ content editors across the globe, the change affected lots of editors. I’ll show you a mail from the head of our marketing department, Paul Markun, to all the content editors:

Hello Content Editors:

Please remember there is a content freeze on Sitecore.net until this Monday, Nov 17th.

But , once you do start editing content on Monday or later, the tips that Oksana put together below for editors – specific to our implementation – may be helpful. If you experience any issues please let us know (myself and Oksana). Thanks.

——————————————————–

After switching Sitecore.net to Sitecore 6.0, you will notice the following few changes in the content editor. These changes are big functionality improvements, but some of them might be a little confusing at first, in particular because we are running in live mode. Live mode means that we use only one database for both working version and published version of the content. In live mode, the workflow is the only mechanism that controls when our changes become visible on the web. So publishing an item in live mode is equivalent to completing the workflow for it; that is, reaching the workflow’s final state.

At this point we keep the workflow for all Sitecore.net items the same as before the conversion to Sitecore 6. In this workflow, the item only has 2 states: Edited and Published. In the Published state, the latest saved version of the content item is visible to the web site visitors. In  the Edited state, the previous version of the item is visible on the web , and the latest working version is only available to the content editors, no matter how many times it is saved. When content editors feel that the latest version of an item is ready to be published, they execute the Publish command to move the item to the Published state. Once the item is moved to the Published state, its latest version becomes available on the web site.

There is no approval state in the current workflow and everyone has the ability to publish items they have write access to. In the future we might introduce a more complicated workflow for some items that will require someone else’s approval before the item can be published.

The changes you might notice are:

1. Workflow warning message:
clip_image002
This warning does not apply to the live mode, where publishing is equivalent to moving the item to the final workflow step. So just ignore it and publish the item by clicking the Publish command of the Editing state in Home/Edit menu area as you did previously in 5.3.
clip_image004

2. Validation errors
clip_image006
If you hover over the red vertical line indicating the presence of validation errors, you will see the short validation summary for this field.
Depending on how the validation rules are set up, the errors might or might not prevent you from publishing (or completing the workflow) for this item.
The best practice is to solve all validation issues before publishing your items.

3. Rich text fields are automatically validated to comply with w3c XHTML standards. You can use the Suggest Fix feature to have Sitecore automatically fix XHTML validation errors for you.
clip_image008

4. There are a number of data types that were announced deprecated (or obsolete) in Sitecore 6. These types were superseded by newer, more powerful types.

These are:
clip_image009

Even though the old types are still supported, we have found a few problems with them during our testing. For example, the regional editor would not be able to insert a link to partner’s website because the template used the old Link type.
We tried to fix as many problems as possible, but there is still a chance that there are more. So if you edit an item in Sitecore.net on version 6 and encounter a problem such as  not being able to edit a field of the above type, it is because this type has been deprecated in version 6. Please let us know and we will fix it quickly.

And of course, there is a detailed Sitecore 6 content editing reference, available on SDN: http://sdn.sitecore.net/upload/sitecore6/contentauthorscookbook-usletter.pdf.

———————————————

Best Regards,
Paul Markun

VP Marketing

As you can see, our marketing team has confidence – after this short briefing – that we’ll be able to start editing again. I think this is the right approach for your editors as well. They should start working like we do. Instructions of what’s not 100% clear can be done (on individual base) later on.

NOTE: You’re absolutely allowed to use the above description for your editors. But keep in mind that this applies to our specific Sitecore implementation. Some of the points(like Live mode) might not apply at all to your implementation.

Thanks to Paul for allowing me to post this internal email. To my audience: Good luck spreading the word!

This week I got notified that one of the Dutch developer from our partner Evident is blogging about Sitecore: Mark van Aalst.
Good work Mark and keep up posting. Hopefully a bit more then I do… ;-)

« Newer Posts - Older Posts »