Skip to main content

App Credentials

An app identity's credentials are a private key and a certificate. Whoever holds them can serve the app's address. Treat them like a password.

Where they live

  • asyx app create makes the key on the set-up computer and keeps it in ~/.asyx/apps/<appId>/ (folder and files readable by you only).
  • The project folder gets asyx.json only: the app's name, id and address. No secrets; safe to commit.

Rules

  • Never commit the key. Not in the repository, not in a committed .env file, not in a Docker image layer.
  • Never print it. asyx app export refuses to print to a terminal unless you add --print. Don't paste it into issues, chat or logs.
  • Hand it over as a file or a pipe. asyx app export <name> --out <path> writes an owner-only file; asyx app export <name> | <your secret store> sends it straight on.
  • One app per service. Create a separate app for each service so you can remove one without touching the others.

On the server

Set ASYX_CREDENTIALS to the exported JSON, or to the path of the exported file, from your platform's secret store. @asyx/tunnel reads it with Asyx.credentialsFromEnv().

The library trusts only Amazon's root certificates (bundled; never downloaded at run time) when it connects to Asyx.

If credentials leak

Remove the app in the console (Devices). Its certificate is deactivated at once, so it can no longer connect or renew; an HTTP tunnel that is already running ends within the hour, when its session token expires. Its address stays on your account. Create a new app pinned to the same address:

asyx app create orders-api-2 --address orders-api

Every app created on your account is announced by email to the account owner.