# Connect your services

Prepare customer-owned data services, arrange secure credential handoff, and validate activation, rotation, and rollback with AppPortal support.

Source: https://appportal.io/docs/enterprise/connect-your-services

Customer-owned database and object-storage connections are set up with AppPortal staff.
There is no customer Dashboard wizard for these connections. First confirm your provider and
feature requirements against [Enterprise data ownership](https://appportal.io/docs/enterprise/overview).

## 1. Agree on scope and responsibilities

Confirm that the Enterprise agreement includes the database or object-storage capability you need.
Document the organization, affected apps, destination region, data classes, retention, backup and
recovery owners, support contacts, and intended activation window.

A database connection can apply to an organization by default or to one app. An active app-specific
connection takes precedence over the organization default. This is not an environment-specific
database selector: review all environments of an affected app. Object storage is selected for the
organization.

Agree how existing data will remain accessible, how new writes will be verified, and how to reverse
the change. Activation alone does not copy historical data to the new service.

## 2. Prepare the destination

Use a dedicated database or private container for the agreed AppPortal scope. Arrange network
reachability from AppPortal's processing services, TLS requirements, and credentials with your
onboarding contact. Confirm that the network route supports connections from AppPortal's services.

Prepare each service independently:

- For records, follow [Telemetry databases](https://appportal.io/docs/enterprise/telemetry-storage#prepare-the-database).
  AppPortal needs schema maintenance, ingestion, queries, and retention access.
- For files, follow [Object storage](https://appportal.io/docs/enterprise/object-storage). Choose Azure Blob Storage,
  Amazon S3, or an S3-compatible service such as Cloudflare R2. Prepare a private container or
  bucket and the read, write, listing, and cleanup permissions for that provider.

AppPortal will agree the minimum permissions and maintenance process for your deployment. Avoid
organization-wide or subscription-wide administration merely to connect one database or bucket.
## 3. Arrange secure credential handoff

Send non-secret resource details to your onboarding contact first. Use the secure handoff process
they arrange for database or storage credentials. Do not paste a connection string, password,
access key, or signed storage URL into a sales form, ordinary support message, application source,
or browser configuration.

AppPortal stores the connection material in its server-side secret store. Configuration holds a
reference to that secret; it is not returned to the customer browser or SDK. Keep credentials
available for rotation and agree who is responsible for replacing them before expiry.

Your installed app continues using its AppPortal app credential and normal service endpoints.
Database or storage ownership does not call for a database password in the SDK, a new client-side
storage URL, or a change to your CI upload credential class.

## 4. Provision, activate, and verify

AppPortal staff validate the agreed destination and activate the connection. Database provisioning
applies the provider schema before making the new connection active. A failed replacement preserves
an already-active database connection; a first connection that fails provisioning is not active.
Treat a saved request or an in-progress setup as incomplete until your contact confirms activation.

Use a small, non-sensitive test app or agreed test data to verify the full route:

1. Send identifiable test events, sessions, logs, and a handled error through the SDK. Confirm
   ingestion and the corresponding AppPortal queries, not just database connectivity.
2. Confirm with the service owner that the records or bytes reached the intended database or
   container and did not cross into another organization's destination.
3. For object storage, upload a test build and matching symbols, then download as an authorized
   recipient. Exercise branding or diagnostic attachments if included in your scope.
4. Check the app's other enabled workflows, especially before choosing ClickHouse or Kusto.
   Confirm retention/deletion behavior with disposable test data and verify backup responsibility.
5. Agree the evidence for success, operational monitoring, and the recovery procedure before
   switching production traffic.

After ingestion, check that the records appear in both the selected destination and the Dashboard.

## 5. Rotate, recover, and retire safely

Coordinate a failed connection with support using the organization/app, time window, provider,
non-secret error summary, and test identifiers. Active connection or secret failures must be
resolved; do not point an app at another database as an improvised retry strategy.

For a database replacement, keep the previous database and its credentials available while
historical reads, retention, and any agreed migration are completed. Reversing a connection change
does not copy newly written records back to the previous database.

For object storage, existing files continue to refer to the destination where they were written.
A replacement container receives new files; it does not relocate older ones. Keep retired
containers and working credentials until AppPortal confirms all remaining reads and cleanup are
complete. Coordinate credential rotation for both current and retired destinations with support.

Disabling a connection or removing its Enterprise entitlement can change where new data is routed,
including returning to managed storage. Plan that transition before changing an agreement or
revoking credentials. Use [AppPortal support](mailto:support@appportal.io) or your agreed Enterprise
support channel for activation, rotation, and retirement.
