When your B2C Commerce Staging instance migrates to Hyperforce, the two-factor authentication (2FA) method used for secure code uploads changes. Customers who have not generated and registered a new self-signed CA certificate bundle before their migration will be unable to upload code to Staging after the migration is complete.
The two main changes are:
cert.staging.<realm>.<customer>.demandware.net hostname. After migration to Hyperforce, code uploads use the standard Business Manager hostname (for example, staging-<realm>-<customer>.demandware.net). The cert.staging hostname is deactivated after migration. Regular Business Manager operations — such as browsing the admin UI — do not require a client certificate; the mTLS client certificate is only required for code uploads.Key facts about the new CA certificate bundle:
Transition guidance: Until a Staging instance migrates to Hyperforce, customers continue using existing client certificates with the legacy cert.staging hostname. After migration, customers switch to new client certificates using the standard Business Manager hostname.
A B2C Commerce developer uploads code cartridges to their Staging instance using UX Studio (Salesforce's B2C Commerce IDE) several times per week. After their Staging instance migrates to Hyperforce, UX Studio returns a connection error when attempting a code upload — the cert.staging hostname no longer exists and the old client certificate is not trusted by the new eCDN infrastructure. The fix is to generate a new self-signed CA certificate bundle, register it in Business Manager, and generate a new per-user client certificate signed by that bundle. The three-step process below walks through the full implementation.
Please find instructions for uploading code to a B2C Commerce Staging instance on Hyperforce via CLI and OpenSSL
Detailed steps to upload code via CLI using the Agentic B2C Developer Toolkit are outlined in Deploying to Hyperforce.
Run the following openssl command to generate a CA certificate (.crt) and private key (.key). Replace <realm> and <customer> with your actual realm ID and customer ID.
CERT_HOST=staging-<realm>-<customer>.demandware.net
openssl req -new -newkey rsa:2048 -sha256 -days 365 -x509 -nodes \
-addext "basicConstraints=critical,CA:TRUE" \
-addext "keyUsage=critical,keyCertSign,cRLSign" \
-keyout ${CERT_HOST}.key \
-out ${CERT_HOST}.crt
This command produces two files in your working directory:
${CERT_HOST}.crt — the CA certificate (upload this to Business Manager in Step 2)${CERT_HOST}.key — the private key (upload this alongside the certificate in Step 2)When prompted, fill in your organisation details. For Common Name, use the same value you set for CERT_HOST (for example, staging-noramer-mycustomer.demandware.net).
Example prompt responses:
Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: MA
Locality Name (eg, city) []: Burlington
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Salesforce
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []: staging-<realm>-<customer>.demandware.net
Email Address []:
Key parameters explained:
-newkey rsa:2048 — generates a new RSA (Rivest–Shamir–Adleman) key pair with a 2048-bit key length, which meets current security standards.-sha256 — signs the certificate using the SHA-256 hashing algorithm.-days 365 — sets the certificate validity to 365 days (the maximum allowed by B2C Commerce).-x509 — outputs a self-signed certificate rather than a certificate signing request (CSR).-nodes — generates the private key without a passphrase (required for automated server-side use).-addext "basicConstraints=critical,CA:TRUE" — marks this certificate as a Certificate Authority (CA) certificate. This flag is required. See the Troubleshooting section if you omit it.-addext "keyUsage=critical,keyCertSign,cRLSign" — specifies that this CA certificate can sign other certificates and certificate revocation lists (CRLs). Best practice.In Business Manager for your Staging instance, navigate to Administration → Site Development → Development Setup → Code Upload Certificate.
hyperforce-staging-ca-2024).${CERT_HOST}.crt into the Certificate field.${CERT_HOST}.key into the Private Key field.Multiple CA certificates can be active simultaneously. If any CA certificates are unused, expired, or compromised, select them on this screen and delete them.
Client certificates are generated per user but can all be signed with the same CA certificate from Step 1. Each user needs their own client certificate to upload code. Complete the following steps for each user:
Replace <bm_username> with the user's Business Manager username. Omit a challenge password and optional company name when prompted.
USER=<bm_username>
openssl req -new -sha256 -newkey rsa:2048 -nodes -out ${USER}.req -keyout ${USER}.key
This produces:
${USER}.req — the CSR file (used in the next step to generate the signed certificate)${USER}.key — the user's private key (share this securely with the user alongside the .p12 file)
openssl x509 -CA ${CERT_HOST}.crt -CAkey ${CERT_HOST}.key \
-req -in ${USER}.req -out ${USER}.pem -days 90
This produces ${USER}.pem — the signed client certificate. The -days 90 value sets a 90-day validity period for client certificates. Adjust as appropriate for your security policy, but note that the CA certificate itself expires after 365 days.
The .p12 file is the format accepted by UX Studio and WebDAV clients such as CyberDuck. Set an export password when prompted — share this password securely with the user alongside the .p12 file.
openssl pkcs12 -export -legacy -in ${USER}.pem -inkey ${USER}.key \
-certfile ${CERT_HOST}.crt -name ${USER} -out ${USER}.p12
This produces ${USER}.p12 — the client certificate bundle to distribute to the user.
Note on the -legacy flag: Newer versions of OpenSSL (3.x) use a different default encryption algorithm for .p12 files that macOS Keychain cannot import. The -legacy flag instructs OpenSSL to use the older encryption format. If you are not on macOS or are using OpenSSL 1.x, you may not need this flag.
The ${USER}.p12 file can now be used with UX Studio and WebDAV clients like CyberDuck to upload code to the Staging instance.
The CA certificate expires after a maximum of 365 days. Renew it before expiry to avoid disruption to code uploads. Also rotate if the CA certificate or any client certificate it has signed is compromised.
To renew:
Alternatively, use the CDN-API delete code upload certificate endpoint to delete the old CA certificate programmatically.
This error appears in Business Manager when you attempt to upload a certificate that is not a valid CA certificate.
Run the following diagnostic command to inspect your certificate:
openssl x509 -in ${CERT_HOST}.crt -text -noout | grep -A2 -E "Basic Constraints|Signature Algorithm"
In the output, look for the X509v3 Basic Constraints section. If this section is missing entirely or contains CA:FALSE, the certificate was generated without the -addext "basicConstraints=critical,CA:TRUE" flag.
Regenerate the certificate using the full command from Step 1, which includes both required extensions:
openssl req -new -newkey rsa:2048 -sha256 -days 365 -x509 -nodes \
-addext "basicConstraints=critical,CA:TRUE" \
-addext "keyUsage=critical,keyCertSign,cRLSign" \
-keyout ${CERT_HOST}.key \
-out ${CERT_HOST}.crt
Root cause: macOS ships with a version of OpenSSL (LibreSSL) that does not include basicConstraints=CA:TRUE in its default configuration. Always use the explicit -addext flags shown above.
This error means you uploaded a client (leaf) certificate instead of a CA certificate. Return to Step 1 and ensure you are uploading the .crt file produced by the openssl req ... -x509 command, not a .pem file produced during Step 3.
002772125

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.