Loading

Using Public Key Authentication Method for SFTP in B2C Commerce

Julkaisupäivä: Mar 19, 2025
Kuvaus

B2C Commerce supports the Public Key authentication method for Secure File Transport Protocol (SFTP).

Ratkaisu

Use a SFTP client that supports key authentication and integrates with the self-service Private Keys and Certificates user interface on Business Manager. To use key authentication, SSH keys must be converted to PKCS#12 format. Customers must perform the key conversion themselves.

As an example, here is how to wrap a private key named testing_id_rsa:

openssl req -new -days 3650 -key testing_id_rsa -out testing_id_rsa.csr 

openssl x509 -days 3650 -signkey testing_id_rsa -req -in testing_id_rsa.csr -out testing_id_rsa.cer 

openssl pkcs12 -export -out testing_id_rsa.p12 -inkey testing_id_rsa -in testing_id_rsa.cer -certfile testing_id_rsa.cer


The key can then be used by the Jsch SFTP client via the following APIs...

public void setIdentity( String identity, String passphrase );public void setIdentity( dw.crypto.KeyRef keyRef );


... OR via the services framework:

createRequest: function(svc:SFTPClient, req) {     svc.client.setIdentity(KeyRef("test_id_rsa", svc.configuration.credential.password)); }

 

Knowledge-artikkelin numero

000391444

 
Ladataan
Salesforce Help | Article