The Qredo API and Partner API are being deprecated and will be replaced by a breaking change in Q4. To receive updates about the release, register here.
Qredo Logo

Signing Agent

Configure

TL;DR

Configuration options

The following settings are configurable via the YAML file:

  • Base
  • Auto approval
  • Qredo WebSocket
  • HTTP
  • Logging
  • Load balancing
  • Store
  • Learn more about setting up cloud storage of secrets.

Configuration properties

Customize the properties of config.yaml to suit your needs.

The following table presents each property.

PropertySub-propertySub-property/OptionsDescription
baseControls connection properties
qredoApihttps://api.qredo.network/api/v1/p, https://sandbox-api.qredo.network/api/v1/pBase domain for the production or sandbox environment
pinPin number used to provide a Zero-Knowledge proof token for communication with the Partner API. This token is passed in the “x-api-zkp” header for authentication.
autoApprovalEnables automatic approval of all transactions
enabledtrue, falseToggles automatic approval on/off
retryIntervalMaxSecMaximum time for which the Signing Agent retries approval attempts. Failure fallback applies after this period
retryIntervalSecInterval between approval attempts. Cycled until retryIntervalMaxSec is reached.
websocketThis is returned with agentID when the agent is registered
qredoWebsocketQredo provides a WebSocket to collect transaction approval requests from
reconnectTimeoutSecTimeout in seconds for connection attempt
reconnectIntervalSecInterval in seconds between connection attempts
pingPeriodSecThe ping period for the ping handler in seconds
pongWaitSecThe pong wait for the pong handler in seconds
writeWaitSecThe write wait in seconds
readBufferSizeThe WebSocket upgrader read buffer size in bytes
writeBufferSizeThe WebSocket upgrader write buffer size in bytes
http
addrThe address and port the service runs on
CORSAllowOrigins*Optional: The value assigned to the Access-Control-Allow-Origin of the responses of the build in API. If not required, pass *.
logAllRequeststrue, falseToggles logging of incoming requests to the build in API on/off
TLSTLS configurations for the internal HTTP server. Used to determine whether HTTP or HTTPS is applied.
enabledToggles whether TLS is enabled on/off with true, false
keyFileIf enabled is true, specifies the key file to use for the TLS server
certFileIf enabled is true, specifies the cert file to use for the TLS server
logging
formattext, jsonFile format for the log
leveldebug, info, warn, errorLog level; default is debug
loadBalancing
enabletrue, falseToggles whether load balancing logic is on/off
onLockErrorTimeoutMsOn lock timeout in milliseconds
actionIDExpirationSecExpiration of action_id variable in Redis in seconds
redis
hostRedis host
portRedis port
passwordRedis password
dbRedis database name
storeStore type holding private key information for the Signing Agent
typefile, oci, aws
fileIf store type is file, pass path to the storage file
ociIf store type is Oracle cloud configuration, details for the Oracle vault
compartmentOracle Cloud Identifier (OCID) where the vault and encryption key reside
vaultOCID of the vault where the secret will be stored
secretEncryptionKeyEncryption key used for both the secret and the data inside the secret
configSecretName of secret that will be used to store the data
awsAmazon cloud configuration to store the private keys in amazon secrets manager
regionIf using AWS Secrets Manager, AWS region where the secret is stored
configSecretIf using AWS Secrets Manager, name of the AWS Secrets Manager secret containing the encrypted data

Example configuration values

Note, this is not an example configuration file, as examples are provided for properties that would conflict, such as storing/passing the private key by different methods.

PropertySub-propertySub-propertyExample
base
qredoApisandbox-api.qredo.network
pin0
autoApproval
enabledfalse
retryIntervalMaxSec300
retryIntervalSec5
websocket
qredoWebsocketwss://sandbox-api.qredo.network/api/v1/p/coreclient/feed
reconnectTimeoutSec300
reconnectIntervalSec5
pingPeriodSec5
pongWaitSec10
writeWaitSec10
readBufferSize512
writeBufferSize1024
http
addr0.0.0.0:8007
CORSAllowOrigins*
logAllRequestsfalse
TLS
enabledtrue
keyFiletls/domain.crt
certFiletls/domain.key
logging
formattext
leveldebug
loadBalancing
enablefalse
onLockErrorTimeoutMs300
actionIDExpirationSec6
redis
hostredis
port6379
password""
db0
store
typefile
file/volume/ccstore.db
oci
compartmentocid1.tenancy.oc1...
vaultocid1.vault.oc1...
secretEncryptionKeyocid1.key.oc1...
configSecretautomatedApproverConfig
aws
regionaws-region-...
configSecretsecretsManagerSecret...

Cloud secret storage

An alternative to storing the Signing Agent configuration on-premises in a file is to use secure cloud-based storage. The following cloud-based solutions are supported.

Oracle Cloud Vault Storage

In order to use Oracle Cloud Vault storage, update your configuration storage setting, i.e. set the store type to oci in the YAML configuration file.

For example, your YAML config should look something like the following:


store:
  oci:
    vault: ocid1.vault....
    secretEncryptionKey: ocid1.key....
    compartment: ocid1.tenancy....
    configSecret: signing_agent_config
  ...
  • Set up an API key on Oracle Cloud
  • Download the config file for the API key, fill in the correct private key path
  • Either put the file in its default location of ~/.oci/config or put it in a custom location and set env var OCI_CONFIG_FILE to the full path including the filename
  • Create a vault and copy the OCID to the config file for the vault setting
  • Create an encryption key (AES or RSA) in the vault, copy it's OCID to the config secretEncryptionKey setting
  • Copy the compartment OCID from the compartment where the vault was created
  • Set a secret name where the Signing Agent will store its configuration and keys
  • Start the Signing Agent and register an agent using the API

AWS Cloud Secrets Manager Storage

In order to use AWS for configuration storage, update your configuration storage setting, i.e. set the storage_type to aws and provide the AWS Region and the name of the Secrets Manager secret in the YAML configuration file.

For example, your YAML config should look something like the following:

store:
  aws:
    region: eu-west-2
    configSecret: signingAgentConfig
  ...

The Secrets Manager secret (i.e. signAgentConfig in this example) needs to be set up in advance. To do this, on the AWS console:

  1. Create a KMS customer-managed key to be used to encrypt the Secrets Manager secret
  2. Create the Secrets Manager secret, naming it and including the KMS key from step 1
    • Select Other type of secret
    • Select Plaintext and enter initialise me
    • From the Encryption key drop-down, select the key created in step 1
    • Name the secret and optionally add a description
  3. Update the Signing Agent's configuration file with the AWS region and secret name

Start the Signing Agent and register the agent using the API.

  • Starting the Agent converts the secret's type from plaintext to binary.

Note: the Signing Agent needs access to AWS credentials in order to use AWS' Secrets Manager. How you do this is dependent on your requirements (for instance, the use of AWS access keys or an AWS credentials file, etc.) but, importantly, if running the Signing Agent in a Docker container, the AWS credentials need to be available to the Agent running in the container. This requires passing the AWS credential data to Docker at startup. As an example, AWS access keys can be passed as environment variables:

> docker run -e AWS_ACCESS_KEY=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ...

or, if using an AWS credential data contained in a local directory, something like this:

> docker run -v $HOME/.aws:/root/.aws ...

Specifics are best discussed with your cloud services admin department.

Config Gottchas

HTTP/TLS

If you wish to configure the TLS settings, you must supply the certFile and keyFile to setup HTTPS.

Previous
Load balance