You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add two-factor client certificate (mTLS) support for WebDAV (#94)
Add support for client certificates and SSL verification control for
WebDAV operations, enabling secure connections to instances that require
two-factor authentication.
New CLI flags:
- --certificate: Path to PKCS12 (.p12/.pfx) certificate file
- --passphrase: Passphrase for the certificate
- --selfsigned/--no-verify: Disable SSL certificate verification
Environment variables:
- SFCC_CERTIFICATE, SFCC_CERTIFICATE_PASSPHRASE, SFCC_SELFSIGNED
dw.json fields:
- certificate, certificate-passphrase, self-signed
Also adds 'server' and 'webdav-server' as dw.json field aliases for
consistency with CLI flag names.
**SDK Note**: The `AuthStrategy.fetch` method signature changed from `RequestInit` to `FetchInit`. Custom `AuthStrategy` implementations should update their type annotations.
Copy file name to clipboardExpand all lines: docs/guide/configuration.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,9 @@ You can configure the CLI using environment variables:
68
68
|`SFCC_AUTH_METHODS`| Comma-separated list of allowed auth methods |
69
69
|`SFCC_OAUTH_SCOPES`| OAuth scopes to request |
70
70
|`SFCC_CODE_VERSION`| Code version for deployments |
71
+
|`SFCC_CERTIFICATE`| Path to PKCS12 certificate for two-factor auth (mTLS) |
72
+
|`SFCC_CERTIFICATE_PASSPHRASE`| Passphrase for the certificate |
73
+
|`SFCC_SELFSIGNED`| Allow self-signed server certificates |
71
74
72
75
## .env File
73
76
@@ -142,7 +145,7 @@ If no instance is specified, the config with `"active": true` is used.
142
145
| Field | Description |
143
146
|-------|-------------|
144
147
|`hostname`| B2C instance hostname |
145
-
|`webdav-hostname`| Separate hostname for WebDAV (if different from main hostname). Also accepts `secureHostname` or `secure-server`. |
148
+
|`webdav-hostname`| Separate hostname for WebDAV (if different from main hostname). Also accepts `webdav-server`, `secureHostname`, or `secure-server`. |
146
149
|`code-version`| Code version for deployments |
147
150
|`client-id`| OAuth client ID |
148
151
|`client-secret`| OAuth client secret |
@@ -151,6 +154,27 @@ If no instance is specified, the config with `"active": true` is used.
151
154
|`oauth-scopes`| OAuth scopes (array of strings) |
152
155
|`auth-methods`| Authentication methods in priority order (array of strings) |
153
156
|`shortCode`| SCAPI short code. Also accepts `short-code` or `scapi-shortcode`. |
157
+
|`certificate`| Path to PKCS12 certificate for two-factor auth (mTLS) |
158
+
|`certificate-passphrase`| Passphrase for the certificate. Also accepts `passphrase`. |
159
+
|`self-signed`| Allow self-signed server certificates. Also accepts `selfsigned`. |
160
+
161
+
### Two-Factor Authentication (mTLS)
162
+
163
+
For instances that require client certificate authentication:
The certificate must be in PKCS12 format (`.p12` or `.pfx`). The `self-signed` option is often needed for staging environments with internal certificates.
154
178
155
179
::: tip MRT Configuration
156
180
Managed Runtime API key is not stored in `dw.json`. It is loaded from `~/.mobify`. You can specify `mrtProject` and `mrtEnvironment` in `dw.json` for project/environment selection.
0 commit comments