SFTP Transfer Setup and Authentication in SuiteScript

Configure SFTP transfers in SuiteScript, focusing on setup, authentication, and credential management for secure connections.

·2 min read·View Oracle Docs

Starting with SuiteScript, integrating SFTP transfers is essential for automating data exchanges with external systems. This guide outlines the necessary steps to establish secure connections through proper configuration and authentication processes.

What is SFTP and Why Use It?

SFTP (Secure File Transfer Protocol) enables secure file access, transfer, and management over a reliable data stream. It is widely used in business for safe data sharing and automation of processes.

How to Set Up SFTP Transfers

To successfully connect to your SFTP server with SuiteScript, follow these steps:

  1. Engage with your SFTP Service Provider

    • Determine essential connection properties:
      • Username
      • Password or key
      • SFTP URL
      • Port number
      • Directories for upload/download
      • Host key and type
    • Understand your provider's practices for host key updates, maintenance, and connection failover options.
    • Ensure compatibility of SFTP ciphers with NetSuite by reviewing the Supported Cipher Suites and Host Key Types.
    • Assess the need for at-rest file encryption beyond SFTP's inherent transport encryption.
  2. Develop a Credential Management Suitelet

    • Create custom fields in NetSuite to securely store SFTP usernames and password tokens.
    • Implement the Suitelet which includes:
      • A form displayed on GET requests for user input.
      • Handling POST requests to save credentials securely.
      • Functionality to test the connection to the SFTP server.

    Example Code Snippet for Creating a Credential Form:

    javascript
    1if (request.method === context.Method.GET) {
    2 var form = serverWidget.createForm({title: 'Enter SFTP Credentials'});
    3 var credField = form.addCredentialField({
    4 id: 'custfield_sftp_password_token',
    5 label: 'SFTP Password',
    6 restrictToScriptIds: ['customscript_sftp_script']
    7 });
    8}
  3. Create a Server Script for File Operations

    • Develop scripts capable of:
      • Loading files from the NetSuite File Cabinet and uploading them to the SFTP server.
      • Initiating file downloads from the SFTP server as required.

Key Considerations for SFTP Authentication

Using two-factor authentication for SFTP connections can enhance security by requiring both a password and a key. SuiteScript supports this configuration, ensuring that sensitive data is handled appropriately.

Conclusion

Implementing SFTP transfers in SuiteScript requires careful planning and execution. By effectively preparing and managing credentials, you can automate data exchanges securely and efficiently.


Who This Affects

  • Developers: Responsible for implementation and code customization.
  • Administrators: Oversee configurations and security setups.

Key Takeaways

  • SFTP provides a secure method for file transfers.
  • Implementing a Suitelet for credential management enhances security.
  • Understanding your provider's requirements is crucial for successful integration.

Frequently Asked Questions (4)

Do I need to create custom fields in NetSuite for storing SFTP credentials?
Yes, you need to create custom fields in NetSuite to securely store SFTP usernames and password tokens as part of developing a Credential Management Suitelet.
Is it necessary to use two-factor authentication for SFTP connections in SuiteScript?
While not strictly necessary, using two-factor authentication for SFTP connections in SuiteScript is recommended as it enhances security by requiring both a password and a key.
How can SuiteScript facilitate secure file operations with SFTP?
By developing a server script through SuiteScript, you can execute secure file operations, such as uploading files from the NetSuite File Cabinet to the SFTP server and downloading files from the SFTP server.
What considerations should be taken for SFTP cipher suites in NetSuite?
Ensure compatibility of the SFTP ciphers with NetSuite by reviewing the supported cipher suites and host key types, as this is crucial for maintaining secure connections.
Source: In This Help Topic Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Integration

View all Integration articles →