Skip to main content
Version: 3.1.0

Storage Connection Test (S3, Azure, GCS, FTP)

Version: 3.1.0 Date: 2026-06-12

Goal: Let operators validate storage credentials before saving a configuration, reducing failed protect jobs due to misconfigured storages.

Solution: Backend upload probe (_bcyip_iptower_/upload_test_<timestamp>.txt) per provider, exposed via POST /config/storage/test-connection. UI test button on editor and summary views; Save disabled until the current form config passes.

Features:

  • Test connection button on storage editor with success/fail feedback (icon + floating error popper)
  • Save disabled until test passes for the current configuration snapshot
  • Read-only storage summary page at /storages/:name with inline test, Edit, and Delete
  • GCP credentials required before test (inline error under upload field)
  • Storage list cards navigate to summary; Edit goes to /storages/:name/edit
  • Task detail pages link source → workflow and destination → storage

Implementation Details:

  • GCS accepts inline credFileContent or existing keyPath on edit
  • FTP errors propagate SDK message instead of generic wrapper
  • API returns BadRequestException with provider error message on failure

Files Modified:

  • src/config.dto.ts - TestStorageConnectionDto separate from CreateStorageDto (keyPath optional, GCS creds optional)
  • src/app.controller.ts - POST config/storage/test-connection endpoint
  • src/protocol/storage/storage.service.ts - testConnection dispatcher
  • src/protocol/storage/amazon-s3/amazon-s3.service.ts - S3 probe upload
  • src/protocol/storage/azureBlobStorage/azure-blob-storage.service.ts - Azure probe upload
  • src/protocol/storage/google-cloud-storage/google-cloud-storage.service.ts - GCS probe + inline credentials
  • src/protocol/storage/ftp/ftp.storage.service.ts - FTP probe upload
  • src/protocol/capacities/ftp-capacity/ftp-capacity.service.ts - propagate FTP SDK errors
  • ui/src/protocol/tower.api.ts - testStorageConnection client
  • ui/src/pages/storages/StorageEditor.tsx - test UX, GCP validation, Save gate, FTP layout
  • ui/src/pages/storages/StorageSummary.tsx - read-only view + test connection
  • ui/src/pages/storages/StorageConnectionError.tsx - shared error display
  • ui/src/pages/storages/StorageItem.tsx - card navigation to summary/edit
  • ui/src/routes.tsx - /storages/:name summary, /storages/:name/edit editor
  • ui/src/pages/dashboard/taskDetails/GitTaskDetails.tsx - links to workflow/storage
  • ui/src/pages/dashboard/taskDetails/FtpTaskDetails.tsx - links to workflow/storage
  • src/protocol/storage/*/*.service.spec.ts - unit tests for testConnection per provider