1. Introduction

Content as a Service provides the editorial data of FirstSpirit via a uniform JSON-based data format that can be consumed by any endpoint. Using the CaaS Connect module reduces the configuration and administration effort in the FirstSpirit project for the delivery layer considerably.

In the remainder of this document the abbreviation CaaS will be used instead of Content as a Service.

1.1. Technical requirements

Besides the FirstSpirit version 5.2.210208, the module requires access to the CaaS platform. An API key with appropriate permissions must be configured, and the accessibility of the platform endpoint over the network must be ensured. For more information on installing and using the CaaS platform, refer to the appropriate documentation.

2. Installation of the module

The module has no dependencies on other modules and can therefore be installed very easily on the FirstSpirit server. Since projects must be explicitly marked as CaaS projects, the project data is not automatically synchronized after the module is installed. In order for the module to work as expected, the service component must be configured.

3. Components

In the following chapters all components of the module and their administration are described.

3.1. CaaS service

The service component CaaS Connect Service is the link between the projects on the FirstSpirit server and the CaaS platform. In order for project content to be transferred to the platform, the service must be started. If the service is stopped, no synchronization takes place. A valid configuration is required to operate the service. The configuration dialog of the service component CaaS Connect Service shows which fields are optional or mandatory and notifies when the entered values are invalid. The minimal configuration includes a reachable CaaS platform and an API key that has read and write access to all CaaS projects. More information about API keys and permissions can be found in the CaaS platform documentation.

service config
Figure 1. Configuration dialog of the CaaS Connect Service component

The tenant ID may consist of a maximum of 63 characters and is not case-sensitive.

3.1.1. Media deployment

Media binary data can be stored either in the CaaS platform or in an S3-compatible service. Saving binary data in the CaaS platform is the default configuration. If binary data is to be delivered via a S3 service, the configuration of the service component CaaS Connect Service must be adjusted accordingly.

If the media deployment is changed, previous binary data URLs become invalid. As soon as a medium is changed or released again, both binary data and URLs are updated. If needed, a full synchronization can be performed to avoid having to make project changes. The two schedules that were automatically created can be used to trigger a full synchronization for this purpose.

Configuration of an S3 deployment: Both Amazon S3 and S3-compatible services can be used for delivery. The specification of an S3 endpoint is optional. If no end point is specified, it is assumed that Amazon S3 is being accessed. In this case, a client region must be specified so that the Amazon end point can be determined. It is composed as follows: s3.$clientRegion.amazonaws.com. The access credentials for the S3 service are also optional. If there is no specification in the configuration, environment variables and system properties are evaluated. Further information about such a configuration can be found in the official Amazon S3 documentation.

If an S3-compatible service is used without using a CloudFront domain, the links of the binary data of media files will use the virtual hosted-style format. For more information about the format and its limitations see Virtual hosting of buckets and Amazon S3 Path Deprecation Plan.

3.2. ProjectApp

When adding the project component CaaS Connect project app to a project, it activates the CaaS Connect module for that project. No project-specific configurations are possible and therefore not necessary. However, the configuration dialog of the project component can be used to lookup the CaaS base URLs that are available for the project.

project app config
Figure 2. Configuration dialog of the project component of CaaS Connect

Adding the project component generates two jobs for the respective project, CaaS Connect Release Generation and CaaS Connect Preview Generation. These carry out a full synchronization for the release or preview status for the project.

The two schedules that are created after adding the project component can be used to synchronize the data of pre-existing project content with the CaaS platform.

4. Automated configuration of the module

Besides the manual configuration via the FirstSpirit interface, CaaS Connect version 3 or later on can also be configured via the file system. To achieve this, all that is necessary is to create a JSON configuration file. The service CaaS Connect Service automatically loads the file caasConnect.json at startup, which must be located in the FirstSpirit server in ./conf/modules/CaasConnect.CaasConnectService/caasConnect.json. The following examples show the format of the configuration file that is required and supported.

Never use the values of the sample configurations on your test or production systems as is, but replace them with values specific to your project.

Minimal configuration, content of the caasConnect.json file
  // The CaaS platform endpoint
  // The API key that is used for data transfer between module and platform
  "apiKey": "ef27ef88-11c1-4ba0-946c-5c82d2880a18",
  // The name or abbreviation of the tenant
  "tenantId": "defaultTenant"
Content of the caasConnect.json file
  // The CaaS platform endpoint
  // The API key that is used for data transfer between module and platform
  "apiKey": "ef27ef88-11c1-4ba0-946c-5c82d2880a18",
  // The name or abbreviation of the tenant
  "tenantId": "defaultTenant",
  // optional, to be used when deploying media to S3 instead of CaaS
  "mediaConnectorConfig" : {
    "S3": {
      // The endpoint of the S3 service
      "endpointUri": "http://localhost:9000",
      // optional, to use if no environment variables or system properties are used for S3 credentials
      "credentials": {
        "accessKeyId": "mySecretS3KeyId",
        "secretAccessKey": "mySecretS3AccessKey"
      "bucketName": "examplebucketname",
      "timeoutInSeconds": 10,
      // optional, to be used if a specific region should be used for Amazon S3
      "clientRegion": "eu-central-1"
  // optional, use only if the CaaS platform or other services (S3, CloudFront) should be accessed via a proxy
  "proxyAddress": "foo:123"

If an error occurs while the service is reading the configuration file, a corresponding error message is displayed in the FirstSpirit log. Since the service cannot start without a valid configuration file, the functionality of the module is severely limited in this case.

Some configuration values are subject to further restrictions besides optionality, for example, a bucket name cannot contain uppercase letters. Invalid values are displayed directly in the UI and cannot be saved. If such an invalid configuration is stored as a file, a corresponding error message will appear in the FirstSpirit log and the service will not start.

Adding a project component to a project is also possible via the FirstSpirit API.

ModuleAdminAgent.installProjectApp("CaasConnect", caasConnectProjectAppName, project)

5. Error handling

Invalid configuration or network problems may cause errors on the CaaS Connect module side. All errors are logged in the FirstSpirit log.

5.1. Network error or overload

The module depends on the full availability of the CaaS platform. If the platform is not available or cannot process incoming requests fast enough, the module tries to repeat the requests. If this does not succeed either, an error is displayed in the FirstSpirit log and possible changes to the data are not synchronized with the CaaS platform. The editor is not notified of the error, so monitoring the server log by the administration is essential. If an error occurs it can be corrected either by executing the schedules or by repeating the action that lead to the data change.

5.2. Configuration of the API key

The API key configured in the service component is used to synchronize all projects on the server with the CaaS platform. The API key therefore requires write and read permissions for all CaaS projects, on the FirstSpirit server. For more information on configuring API keys, refer to the CaaS platform documentation.

5.3. Push notifications (change streams).

The change stream definitions can be found in the metadata of the collections. They are created at the same time as the collection. If the definitions are missing, they can be restored by triggering a new deployment by executing a schedule.

The CaaS is a product of e-Spirit AG, Dortmund, Germany.

Only a license agreed upon with e-Spirit AG is valid with respect to the user for using the module.

7. Help

The Technical Support of the e-Spirit AG provides expert technical support covering any topic related to the FirstSpiritâ„¢ product. You can get and find more help concerning relevant topics in our community.

8. Disclaimer

This document is provided for information purposes only. e-Spirit may change the contents hereof without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. e-Spirit specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. The technologies, functionality, services, and processes described herein are subject to change without notice.