Skip to main content

Sign and verify without exposing your keys with the Tines 3B secrets service

Create a Tines 3B secrets service connector, then ask Tines 3B to sign API calls or verify incoming requests while your keys stay out of workflow code.

Written by Jamie Gaynor

Some integrations need a cryptographic operation rather than a stored API token. You might want to confirm that an incoming Slack request really came from Slack, or sign an outbound API call so the receiving service can trust it. The Tines 3B secrets service connector handles both, and the secret key never reaches your workflow code.

You create a connector once and give it the key. From then on, you describe what you want in plain language, and Tines 3B attaches the connector and writes the step that signs or verifies for you. The key stays encrypted and inside the proxy the whole time.

Create a Tines 3B secrets service connector

Because the connector holds a secret, you set it up yourself rather than asking Tines 3B to do it. To create one:

  1. Under connectors, go to the 3B tab and select 3B secrets service.
    ​

  2. Give it a name.

  3. Choose a permission.

  4. Choose a key type.

  5. Provide the key.

    1. For HMAC, pick the secret encoding (text, hex, or base64) and paste a shared secret of at least 14 decoded bytes.

    2. For the asymmetric types, upload a PEM file: the private key for a signing connector, or only the public key for a verification connector.

A couple of rules shape how you set these up:

  • One operation per connector. Each connector either signs or verifies, never both. If a workflow needs to do both, create one connector for each.

  • One key per connector. The key is fixed on the connector, so you swap keys by using a different connector, not by changing any code.

Because a signing connector takes a private key and a verification connector takes only a public key, a verification connector never holds signing material.

Ask Tines 3B to verify a Slack request

Once the connector exists, you don't attach it or write code by hand. Describe what you want, and Tines 3B attaches the verification connector to the step and writes the check.

For example:

"Verify that incoming Slack requests are genuine using my Slack signing secret, and reject stale ones."

Tines 3B rebuilds the string Slack signs, which is v0:${timestamp}:${rawRequestBody}, strips the v0= prefix from the signature, and confirms it. It also checks the request timestamp separately and rejects stale ones, since the secrets service verifies the signature but does not guard against replay on its own.

The step Tines 3B writes sends the message and signature to the service and reads back whether it is valid:

const signature = slackSignature.replace(/^v0=/, ""); 
const input = `v0:${timestamp}:${rawRequestBody}`;

const response = await fetch("https://secrets.3b.internal/verify", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ input, signature }),
});
if (!response.ok) throw new Error("Verification failed"); const { valid } = await response.json();

Note: You don't need to type this. It's shown so you can see what Tines 3B builds on your behalf.

Ask Tines 3B to sign an outbound call

Signing works the same way. Describe the request you want to sign, and Tines 3B uses a signing connector to do it. For example:

"Sign this payload with my API signing key before sending it, and add the signature as a header."

Tines 3B sends the message to the service and uses the hex signature it returns, without the key ever appearing in the step:

const response = await fetch("https://secrets.3b.internal/sign", {   
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ input: message }),
});
if (!response.ok) throw new Error("Signing failed");
const { signature } = await response.json();

How the service responds

It helps to know what the service returns, so you can tell whether a result is what you expected:

  • A verify request returns valid: true or valid: false. A false result covers an incorrect or malformed signature, so the workflow keeps running and you decide what to do with an invalid request.

  • A sign request returns the signature as hex. If you need another encoding, ask Tines 3B to convert it.

  • A problem request returns an error. Invalid requests, an unavailable connector, and an operation the connector does not permit all come back as errors rather than a valid result.

Things Tines 3B can handle when you ask

A few less common needs are supported, and you reach them by asking rather than configuring:

  • Binary input. Input is treated as text by default. For binary data, ask Tines 3B to send it as base64, and it sets the right option.

  • ECDSA signature format. For ECDSA keys, Tines 3B can produce the compact 64-byte format that JWTs use (the default) or the ASN.1 DER format. Mention which one the other service expects.

  • Related work stays in the step. Hashing, encoding conversions, JWT formatting and claim validation, and replay checks beyond the signature all live in the step Tines 3B writes, not in the secrets service. Describe the end-to-end behavior you need and Tines 3B assembles it.

Note: Encryption and decryption are not available yet. The secrets service signs and verifies only.

Did this answer your question?