Security (Delivery)
Securing CrafterCMS projects/site is a very important aspect of the platform. CrafterCMS provides a number of security features that can be used to secure a project/site. This section will cover the following topics:
Authentication Mechanics
Authorization Mechanics
Securing an Entire Delivery Tier
Securing Sections or Individual Content Items
Authentication Mechanics
CrafterCMS supports a number of authentication mechanisms. The following are supported out of the box:
Securing the Entire Delivery Tier
The easiest way to secure a project is by wrapping the entire delivery tier with an authentication layer that blocks access to _all_ content unless the user is authenticated.
Protecting the entire delivery tier means blocking all access unless the user is authenticated. This can be done in a number of ways: - Configuring Crafter Engine to use SAML2 or Headers-based Authentication for all requests - Configuring the CDN (Content Delivery Network), e.g. AWS CloudFront with AWS Cognito - Configuring a reverse-proxy, e.g. Apache HTTPd with mod_auth_openidc
In this article, we will cover how to configure Crafter Engine to use SAML2 or Headers-based Authentication for all requests. Utilizing a CDN or reverse-proxy is outside the scope of this article, but we will provide a general overview of how to configure them.
Configure Delivery-Wide Authentication
Delivery-wide authentication can be accomplished with Crafter Engine, a CDN, a reverse-proxy, or a combination of these mechanisms.
Crafter Engine Instance-Wide Authentication
Crafter Engine supports the SAML2 protocol of authentication and HTTP-headers-based authentication.
Engine SAML2 Authentication
Crafter Engine’s SAML2 implementation is configured at the instance level. This means that all projects served by this instance node will use the same SAML2 configuration, and will be authenticated against the same SAML2 IdP (Identity Provider).
Follow the article Engine SAML2 Configuration to configure SAML2 authentication for Crafter Engine.
Engine HTTP Headers-Based Authentication
When authenticating outside of Crafter Engine, the authenticating system can pass the authenticated user information to Crafter Engine via HTTP headers. Crafter Engine can then use that information to authenticate the user to the project/site. Learn more about this in the article Configure Headers Based Authentication .
CDN or Reverse-Proxy and Securing Static Assets
It’s sometimes desirable to use a CDN or reverse-proxy to secure the delivery tier. The primary use-case here is the delivery of static assets, such as videos, images, CSS, and JavaScript files via the CDN or reverse-proxy instead of the application tier. This can speed up delivery of these assets, and reduce the load on the application tier.
As an example, AWS CloudFront supports this approach as described in https://aws.amazon.com/blogs/networking-and-content-delivery/securing-cloudfront-distributions-using-openid-connect-and-aws-secrets-manager.
A similar setup can be accomplished with Apache HTTPd and mod_auth_openidc
, whereby Apache HTTPd serves the static assets, and Engine serves the dynamic experience and API calls.
It’s important to remember that for Crafter Engine to know about this authentication that was terminated upstream, it’s important to pass in the correct headers for Crafter Engine to use. Learn more about this in the article Configure Headers Based Authentication .