Portainer icon

Portainer

Interact with Portainer via API

Actions190

Upload → Upload TLS

AI-generated

Overview

This node facilitates uploading TLS (Transport Layer Security) files to a specified folder in a remote system or service. It is particularly useful when managing secure connections that require TLS certificates, keys, or certificate authorities. Common scenarios include automating the deployment of TLS credentials for services that need encrypted communication, such as web servers, API gateways, or container management platforms.

For example, you can use this node to upload a CA certificate, client certificate, or private key file to a designated folder on a server, ensuring that your infrastructure components have the necessary security credentials without manual intervention.

Properties

Name Meaning
Certificate The type of TLS file being uploaded. Valid options are: Ca (Certificate Authority), Cert (Certificate), or Key (Private Key).
Folder The destination folder path where the TLS file will be stored. If the folder does not exist, it will be created automatically.
File The actual TLS file to upload. This should be the file content or reference to the file to be transferred.

Output

The node outputs JSON data representing the result of the upload operation. This typically includes confirmation details such as success status, file location, or any metadata returned by the target system after storing the TLS file.

If the node supports binary data output (e.g., returning the uploaded file or related binary content), it would represent the TLS file or associated data in binary form. However, based on the provided code and properties, the primary output is JSON confirming the upload.

Dependencies

  • Requires an API key or authentication token credential to connect securely to the target system.
  • Depends on a configured base URL endpoint for the remote service where TLS files are uploaded.
  • Uses HTTP requests with JSON payloads to perform the upload operation.
  • No additional external libraries beyond those bundled with the node are explicitly required.

Troubleshooting

  • Common Issues:

    • Incorrect folder path or insufficient permissions may cause upload failures.
    • Uploading an unsupported TLS file type (other than ca, cert, or key) will likely result in errors.
    • Missing or invalid authentication credentials will prevent successful connection to the target service.
  • Error Messages:

    • "Authentication failed" — Verify that the API key or authentication token is correctly configured and has sufficient privileges.
    • "Folder creation failed" — Check if the user has write permissions on the target system or if the folder path is valid.
    • "Invalid TLS file type" — Ensure the Certificate property is set to one of the allowed values (ca, cert, key).

Resolving these issues generally involves verifying input parameters, checking credentials, and ensuring network connectivity to the target service.

Links and References

Discussion