# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0
# Docker: Environment variables in Compose

## CERTS
AM_CERTS_LOG_LEVEL=debug
AM_CERTS_DB_HOST=certs-db
AM_CERTS_DB_PORT=5432
AM_CERTS_DB_USER=absmach
AM_CERTS_DB_PASS=absmach
AM_CERTS_DB=certs
AM_CERTS_DB_SSL_MODE=disable
AM_CERTS_DB_SSL_CERT=
AM_CERTS_DB_SSL_KEY=
AM_CERTS_DB_SSL_ROOT_CERT=
AM_CERTS_DB_MAX_CONNECTIONS=100
AM_CERTS_HTTP_HOST=certs
AM_CERTS_HTTP_PORT=9010
AM_CERTS_HTTP_SERVER_CERT=
AM_CERTS_HTTP_SERVER_KEY=
AM_CERTS_GRPC_HOST=certs
AM_CERTS_GRPC_PORT=7012
AM_CERTS_GRPC_SERVER_CERT=
AM_CERTS_GRPC_SERVER_KEY=
AM_CERTS_GRPC_SERVER_CA_CERTS=
AM_CERTS_GRPC_SERVER_CA_KEY=
AM_CERTS_GRPC_CLIENT_CA_CERTS=
AM_CERTS_GRPC_URL=${AM_CERTS_GRPC_HOST}:${AM_CERTS_GRPC_PORT}
AM_CERTS_GRPC_TIMEOUT=
AM_CERTS_GRPC_CLIENT_CERT=
AM_CERTS_GRPC_CLIENT_KEY=
AM_CERTS_GRPC_CLIENT_TLS=
AM_CERTS_GRPC_CA_CERTS=
AM_CERTS_INSTANCE_ID=
AM_CERTS_RELEASE_TAG=latest
# WARNING: This is a development/testing secret only.
# NEVER use this weak secret in production! Generate a strong random secret for production deployments.
AM_CERTS_SECRET=12345678

## OpenBao PKI Config
AM_CERTS_OPENBAO_HOST=http://certs-openbao:8200
AM_CERTS_OPENBAO_APP_ROLE=absmach
AM_CERTS_OPENBAO_APP_SECRET=absmach
AM_CERTS_OPENBAO_SECRET_ID_TTL=720h
AM_CERTS_OPENBAO_NAMESPACE=
AM_CERTS_OPENBAO_PKI_PATH=pki
AM_CERTS_OPENBAO_ROLE=absmach
AM_CERTS_SERVICE_TOKEN_PATH=/openbao/service_token
AM_CERTS_SECRET_ID_PATH=/openbao/secret_id
AM_CERTS_SECRET_RENEW_THRESHOLD=24h
AM_CERTS_SECRET_CHECK_INTERVAL=1h
AM_CERTS_OPENBAO_PKI_CA_CN=Abstract Machines Certificate Authority
AM_CERTS_OPENBAO_PKI_CA_OU=Abstract Machines
AM_CERTS_OPENBAO_PKI_CA_O=AbstractMachines
AM_CERTS_OPENBAO_PKI_CA_C=FRANCE
AM_CERTS_OPENBAO_PKI_CA_L=PARIS
AM_CERTS_OPENBAO_PKI_CA_ST=PARIS
AM_CERTS_OPENBAO_PKI_CA_ADDR=5 Av. Anatole
AM_CERTS_OPENBAO_PKI_CA_PO=75007
AM_CERTS_OPENBAO_PKI_CA_DNS_NAMES=localhost
AM_CERTS_OPENBAO_PKI_CA_IP_ADDRESSES=127.0.0.1,::1
AM_CERTS_OPENBAO_PKI_CA_URI_SANS=
AM_CERTS_OPENBAO_PKI_CA_EMAIL_ADDRESSES=info@abstractmachines.rs
AM_CERTS_OPENBAO_UNSEAL_KEY_1=
AM_CERTS_OPENBAO_UNSEAL_KEY_2=
AM_CERTS_OPENBAO_UNSEAL_KEY_3=
AM_CERTS_OPENBAO_ROOT_TOKEN=

## Jaeger
AM_JAEGER_PORT=6831
AM_JAEGER_FRONTEND=16686
AM_JAEGER_URL=http://jaeger:4318/v1/traces
AM_JAEGER_TRACE_RATIO=1.0
AM_JAEGER_COLLECTOR_OTLP_ENABLED=true
AM_JAEGER_OLTP_HTTP_PORT=4318
AM_JAEGER_MEMORY_MAX_TRACES=5000

#### Auth Client Config
AM_AUTH_URL=auth:9001
AM_AUTH_GRPC_URL=auth:7001
AM_AUTH_GRPC_TIMEOUT=300s
AM_AUTH_GRPC_CLIENT_CERT=${GRPC_MTLS:+./ssl/certs/auth-grpc-client.crt}
AM_AUTH_GRPC_CLIENT_KEY=${GRPC_MTLS:+./ssl/certs/auth-grpc-client.key}
AM_AUTH_GRPC_CLIENT_CA_CERTS=${GRPC_MTLS:+./ssl/certs/ca.crt}
AM_AUTH_GRPC_SERVER_CA_CERTS=${GRPC_MTLS:+./ssl/certs/ca.crt}

#### Domains Client Config
AM_DOMAINS_URL=domains:9003
AM_DOMAINS_GRPC_URL=domains:7003
AM_DOMAINS_GRPC_TIMEOUT=300s
AM_DOMAINS_GRPC_CLIENT_CERT=${GRPC_MTLS:+./ssl/certs/domains-grpc-client.crt}
AM_DOMAINS_GRPC_CLIENT_KEY=${GRPC_MTLS:+./ssl/certs/domains-grpc-client.key}
AM_DOMAINS_GRPC_CLIENT_CA_CERTS=${GRPC_MTLS:+./ssl/certs/ca.crt}
