Skip to content

Environment Setup

Install package

Content

  • sdsdk.tar.gz: contains the SDSDK package in 3 formats: UMD, MJS and CJS for Node and Web platforms. Theses platforms are different in terms of use and installation.
    • sbom-all.json: Complete SBOM - Software Bill of Materials - This file includes a comprehensive list of all dependencies, covering both production and development dependencies, providing a full overview of the software components.
    • sbom-prod.json: Production SBOM - Software Bill of Materials - This file lists only the production dependencies.
  • sdsdk_sha256.txt: contains the SHA256 hash of the sdsdk.tar.gz file.
  • sdsdk_doc.tar.gz: contains a static HTML documentation of the SDSDK product.

Check integrity

It is recommended to check the integrity of the sdsdk.tar.gz prior to manipulation:

bash
sha256sum -c sdsdk_sha256.txt

Compatibility

Stormshield guarantees the correct functioning of the SDK on the following versions:

PlatformVersion
Node.js20
Firefox139
Chromium138

Installation in Node.js environments (via npm)

Install package with npm

bash
npm install ./sdsdk.tar.gz

Then, you can use sdsdk in your code as follows:

javascript
import { ztdfEncrypt } from 'sdsdk';

const ztdf = await ztdfEncrypt(...)

Installation in Web environments (HTML)

bash
## Unpack SDK
tar -xzf sdsdk.tar.gz

To use the UMD format, add the following tag:

html
<script src="./path-to-sdsk/sdsdk/dist/sdsdk.js"></script>

To use the ESM format, add the following tag:

html
<script type="module">
  // Import exemple
  import { ztdfEncrypt, ztdfDecrypt } from './path-to-sdsk/sdsdk/dist/sdsdk.mjs';
  ztdfEncrypt(...)
</script>

KAS setup

The Key Access Server (KAS) is the server that enables you to securely store your keys. The SDSDK is compatible with Stormshield KMaaS. You must configure a Crypto API application in your KMaaS. For more information, refer to the KMaaS documentation.

Network

To ensure communication, the SDSDK must be able to contact the KAS server via HTTPS.

Egress traffic URL:

DeploymentURL
On-premiseURL of the server hosting the service (refer to KMaaS documentation for more information)
SaaShttps://cse.mysds.io

HTTP endpoint:

EndpointDescription
https://<kmaas-url>/api/v1/<tenant-id>/crypto/encryptKMaaS Crypto API encrypt endpoint
https://<kmaas-url>/api/v1/<tenant-id>/crypto/decryptKMaaS Crypto API decrypt endpoint

HTTP methods:

MethodDescription
POSTUsed to contact the Crypto API endpoint
OPTIONSUsed for Cross-Origin Resource Sharing (CORS) preflight requests, in web environment