---
name: tsa

description: |
  TSA registers workers with the ATC via a SSH interface.

templates:
  tsa_ctl.erb: bin/tsa_ctl
  host_key.erb: config/host_key

packages:
  - pid_utils
  - tsa
  - generated_signing_key
  - generated_tsa_host_key
  - generated_worker_key

consumes:
- name: atc
  type: atc

provides:
- name: tsa
  type: tsa
  properties:
  - bind_port
  - host_public_key

properties:
  heartbeat_interval:
    description: |
      Interval on which to register workers with the ATC.
    default: 30s

  forward_host:
    description: |
      Address to advertise forwarded worker connections to.

      If not specified, the instance's address is used.

  bind_port:
    description: |
      Port on which to listen for SSH connections.
    default: 2222

  host_key:
    description: >
      Private key to use for the SSH server.

      If not specified, a deployment-scoped default is used.
    default: ""

  host_public_key:
    description: >
      Public key component of the host's key. This property is
      exported via the `tsa` link so that workers can discover
      it.
    default: ""

  authorized_keys:
    description: |
      Public keys to authorize for SSH connections.
    default: []

  team_authorized_keys:
    description: |
      Public keys to authorize team workers for SSH connections.
    example: |
      - team: concourse
        ssh_key: ssh-rsa key key@pivotal.io
    default: []

  authorize_generated_worker_key:
    description: |
      Permit access via generated worker key, local to the deployment. Set to
      `false` if you plan on only ever using explicitly configured and
      authorized worker keys.
    default: true

  yeller.api_key:
    description: |
      If configured, errors emitted to the logs will also be emitted to Yeller.
      This is only really useful for Concourse developers.
    default: ""

  yeller.environment_name:
    description: |
      Environment name to specify for errors emitted to Yeller.
    default: ""

  atc.url:
    description: |
      ATC API endpoint to which workers will be advertised.
      If not specified, it will be autodiscovered via BOSH links.
    default: "http://127.0.0.1:8080"
