Certificates and signing

Developers can deploy a WebApp to their local sites using a developer license, but official SiteVision-signed certificates are needed to deploy to a production website.

Developers can log on to the developer web and create certificates for their organization. These certificates will be signed by SiteVision, thus can be used by a WebApp in production. When a production certificate is created, it can be utilized during the development of a WebApp via a npm task (or such) that invokes the signing endpoint of the SiteVision developer REST API.

Teams

A certificate always belong to a specific team. A developer must be assigned to a team to be able to create and manage certificates.

Visit the account page to apply for team membership.

Creating a certificate

Certificates are created and managed on the team page. When creating a new certificate, a friendly name and a common name must be entered. The friendly name is used when signing apps. The common name will be visible on the production website.

Default certificate

A team has to have a default certificate selected. The first certificate created will automatically be set as default. The default certificate will be used when signing apps, unless a specific certificate name is provided in the signing request.

Installing a certificate

To be able to deploy a signed WebApp to a production website, the certificate used when signing must be installed on the website. Installing a certificate is done by adding it to the website's trusted certificates list, found in the "Addon certificates"-tab of the site settings panel. Certificates may also be added server-wide, if a developer has access to the sv:systemUser account.

Screenshot of trusted certificate list

Certificate list in site settings

Screenshot of dialog for adding a trusted certificate

Certificates can be added by drag'n'dropping the certificate file into the code area or by copy/paste the certificate content.

Signing a WebApp

Signing a WebApp is handled by the SiteVision developer REST API. All of SiteVision's example WebApps have boilerplate code for invoking the signing endpoint. See the npm scripts available in the WebApp boilerplate example.

In the team page a default certificate is set up, that certificate will be used when signing, unless another certificate name is provided in the signing request. When using the SiteVision npm utility script for signing, one will be prompted for a certificate name, if left blank the default will be used.

Deploying a WebApp to production

A WebApp that will be deployed in a production environment must be signed by SiteVision, as described above.

Deploying a WebApp can be done either through the SiteVision editor or by invoking the WebAppImport endpoint in SiteVision REST API. Npm utility scripts for deploying are available in all SiteVision example WebApps found in SiteVision GitHub repository.

Deploying a WebApp to development environment

When deploying to a development environment the WebbApp must either be signed or the site must have a developer licence with the feature to deploy unsigned WebApps. Contact SiteVision support to obtain a developer licence with the feature to deploy unsigned apps.

Deploying a WebApp can be done either through the SiteVision editor or by invoking the WebAppImport endpoint in SiteVision REST API. Npm utility scripts for deploying are available in all SiteVision example WebApps found in SiteVision GitHub repository

Workflow for deploying a WebApp to production

This workflow assumes that utility scripts from SiteVision's example apps are used, and that an designated addon already exists on the production site.

  1. Make sure you are member of a team on developer.sitevision.se
  2. Download public key of team developer certificate from team page
  3. Install certificate on production site
  4. Sign WebApp using the same certificate installed in step 3
    1. npm run sign, will create a signed version of the WebApp in the dist folder
  5. Deploy WebApp to production
    1. npm run prod-deploy, uploads the signed WebApp to production