DaletGuard supports civilians affected by armed conflict through Families Beyond War. All sides, no political affiliation. About our humanitarian work

CRM Credential Custody for OAuth and API Keys

DaletPipe is a CRM connectivity layer that gives one concrete answer to CRM credential custody for your whole team today. Its connection row holds no secrets, only coordinates for a grant or vault entry, so a leak exposes no token. A separate service, DaletAuth, holds the tokens and keys and hands out short-lived access request, whenever a call needs one. This article explains the choices behind that design and what each choice costs you, so you can weigh the trade-offs. If you want the wider picture first, read the CRM integration guide before this one, and then return to custody.

If you want the wider picture first, read the CRM integration guide. In fact, it places CRM credential custody as part of the first of five steps.

Illustration of plug, puzzle, people for crm credential custody
Key takeaway

Pick one owner for every CRM token and keep copies out of application tables. Use an OAuth grant when a user can consent, and a stored key when a machine must sign. Plan refresh, re-consent and decommissioning before launch.

Which two ways lead into a CRM: a grant or a stored key?

A CRM gives you access in one of two ways. With an OAuth grant, a user signs in at the CRM and approves your app for chosen scopes. Indeed, the CRM then issues an access token and, usually, a refresh token. In fact, you never see the user's password, and the user can revoke the grant later.

Each rule is written down before it is used.

Our team writes about the connection row in plain words.

Share what you learn about the CRM credential custody with your whole team. Short answers on the vault credentials are kept up to date.

Every claim about the CRM credential custody is checked against the code. Thus, each page on the connection row is reviewed before it is published. Indeed, each page on the refresh token is reviewed before it is published.

People new to the re-consent flow should start with the guides. Also, teams often ask us about the vault credentials in practice. Indeed, people new to the access scopes should start with the guides.

With a stored credential, a person copies an API key or a client ID and secret into your system. Besides, your system then signs every call itself. Thus, no consent screen appears, and no user needs to be present. That suits back-office jobs and CRMs that offer nothing else.

Each route has a cost. In addition, a grant needs a user at the start and again after revocation. Weigh that cost when you plan CRM credential custody.

A stored key needs safe storage and a plan for rotation. Indeed, a key often carries wide rights. Overall, the reason is that many CRMs scope keys to a whole account.

DaletPipe names the two routes Nature B and Nature C. Nature B is a delegated grant and covers 31 connectors. Nature C is a machine credential and covers 41. Moreover, both go through DaletAuth, so the rest of the product treats them alike.

DaletPipe connections list screen
For example, the connections list screen of DaletPipe.

Why must CRM credential custody sit with one broker alone?

Every copy of a token is a risk, and weak CRM credential custody multiplies copies. In fact, if three services each keep one, you must rotate in three places. Besides, you must also wipe three places when a customer leaves. A broker reduces that to one place with one audit trail.

Each count is checked against the source. Likewise, every change is reviewed by a second person.

Our team writes about the vault credentials in plain words.

Questions about the CRM credential custody are welcome in the contact form. Notes on the refresh token are dated and reviewed by a second person.

Readers often return to the CRM credential custody when plans change. In addition, a short checklist keeps the connection row under control. Thus, a short checklist keeps the refresh token under control.

Each page on the re-consent flow is reviewed before it is published. People new to the vault credentials should start with the guides. Each page on the access scopes is reviewed before it is published.

The broker also owns refresh. Access tokens expire, and refreshing them is fiddly. Notably, the provider may rotate the refresh token on each use.

Two workers that refresh at once can invalidate each other. Indeed, one owner serializes that work.

Consider who needs what today. Besides, a sync worker needs a valid access token for a minute. Overall, it does not need the refresh token or the client secret.

A broker can give the worker only the first. Also, that limits what a stolen worker log can reveal.

Hosted vendors take this role for their customers. Therefore, CRM credential custody is part of what you buy. Apideck's Vault reference, for example, describes OAuth flows, API key storage and token refresh for each consumer.

Self-hosted teams need the same role in their own stack. Strong CRM credential custody means someone owns it, whether that is a vendor or you.

Illustration for CRM Credential Custody for OAuth and API Keys

What does DaletPipe store about a connection, and what not?

The DaletPipe connection row holds coordinates, not secrets. Likewise, a coordinate is a label that points to a secret somewhere else. Moreover, the row records the provider, the profile and an account label. It also holds a subject reference for grants or a merchant identifier for machine credentials, and a status.

Each step is recorded with its date. Every claim is tied to a line of code.

Notes on the CRM credential custody are dated and reviewed by a second person.

A second look at the CRM credential custody pays off. Overall, share what you learn about the re-consent flow with your whole team.

Short answers on the CRM credential custody are kept up to date. Moreover, share what you learn about the refresh token with your whole team. In fact, our team writes about the re-consent flow in plain words.

A second look at the vault credentials pays off. Our team writes about the access scopes in plain words. A short checklist keeps the access scopes under control.

For a grant, DaletPipe asks DaletAuth for an authorize URL and sends the user there. In fact, after consent, it asks DaletAuth for a fresh access token whenever it needs one. Indeed, the token is cached briefly, with a 60 s margin before expiry. Therefore, a worker never uses one that is about to lapse.

For a machine credential, an administrator posts the client ID and secret to a DaletPipe route. DaletPipe forwards them to DaletAuth and does not keep them. Also, the connection then becomes active. Later calls ask DaletAuth to mint an access token.

One caution applies in practice. Thus, this covers CRM secrets only. Also, the secret for an outbound webhook subscription is a different thing. The code seals it with AES-256-GCM before it is stored beside the subscription URL.

The sealing key comes from a deployment setting, so guard it well. Indeed, read how signature verification works to see what the secret protects.

DaletPipe connector catalog screen
For example, the catalog shows each provider with its status and API style.

Refresh is the quiet part of CRM credential custody. Besides, a good flow asks for a new access token before the old one dies. Notably, it retries once when a call returns 401. It stops when the broker says the grant is gone.

All of these facts are kept in one place.

Notes on the refresh token are dated and reviewed by a second person.

Readers often return to the connection row when plans change. Besides, each page on the access scopes is reviewed before it is published.

Notes on the CRM credential custody are dated and reviewed by a second person. In addition, people new to the connection row should start with the guides. Also, people new to the refresh token should start with the guides.

Teams often ask us about the re-consent flow in practice. A short checklist keeps the vault credentials under control. Moreover, teams often ask us about the access scopes in practice.

DaletPipe field mapping workbench screen
For example, field mappings are previewed and each field gets a named outcome.

Who can fix a grant that has run out on you?

Only a user with the connections write capability can reconnect the account.

The result is stored with the run. Likewise, each step is recorded with its date.

Every claim about the access scopes is checked against the code.

Share what you learn about the CRM credential custody with your whole team. In fact, a short checklist keeps the refresh token under control.

A second look at the CRM credential custody pays off. Indeed, each page on the connection row is reviewed before it is published. In addition, questions about the re-consent flow are welcome in the contact form.

People new to the re-consent flow should start with the guides. Teams often ask us about the vault credentials in practice. Also, people new to the access scopes should start with the guides.

DaletPipe's transport follows that pattern. Thus, a 401 triggers one refresh callback and one retry. Overall, if the call still fails, it raises an expired-authorization error rather than looping.

The token cache also keeps a 60 s skew. Therefore, a token is replaced before it expires.

Revocation is the other failure. Indeed, a customer may remove your app from their CRM, or an administrator may change a password.

DaletAuth answers a refresh with a 409 or 404 in that case. DaletPipe treats either as re-consent. Besides, the sync run records it, and the connection moves to the needs_reconsent state.

Each re-consent needs a person. Plan who gets the message. Also, in many setups the user who first approved access has left the company.

Name a fallback owner for each connection, and show the state where support staff can see it. Likewise, the sync jobs page shows how a stopped run appears.

DaletPipe sync coverage receipts screen
For example, each page read leaves a coverage receipt with its label.

What happens to your data when a connection is disabled?

Ending a connection is part of CRM credential custody. Dead credentials that stay valid are a standing risk. In addition, they also hide the fact that a customer is gone.

The notes are shared with the whole team.

Short answers on the CRM credential custody are kept up to date.

Questions about the CRM credential custody are welcome in the contact form. Notes on the vault credentials are dated and reviewed by a second person.

Each page on the connection row is reviewed before it is published. Also, our team writes about the refresh token in plain words. Moreover, a second look at the re-consent flow pays off.

Questions about the vault credentials are welcome in the contact form. A second look at the access scopes pays off.

DaletPipe's decommission route needs a written reason of 1 to 255 characters. It marks the connection disabled, records who did it and when, and clears sync leases so no worker keeps running. Moreover, it also revokes inbound registrations and keeps the evidence already collected. In fact, after that, the connect route answers with a conflict.

Notice the scope of this route. Indeed, it changes DaletPipe's own state, and the grant itself lives at DaletAuth and at the CRM.

Revoke the app in the CRM as well, and clear the stored key at the broker. A checklist helps: record the reason, stop the work, revoke at the source and confirm the broker holds nothing.

For product teams that connect their customers' CRMs, this checklist matters greatly. See embedded integrations for SaaS products for that setting and the security controls page for server-side checks.

DaletPipe sync activity outcomes screen
For example, every sync run ends in a named outcome you can read.

Which questions should you put to each vendor on custody?

Whether you build or buy, put the same questions to every option. Thus, the answers show where tokens live and who can reach them. Also, write the answers down, and date them.

Every figure is taken from the code.

Teams often ask us about the re-consent flow in practice.

Questions about the connection row are welcome in the contact form. Questions about the access scopes are welcome in the contact form.

Each page on the CRM credential custody is reviewed before it is published. Notably, share what you learn about the connection row with your whole team. Thus, share what you learn about the refresh token with your whole team.

Each page on the re-consent flow is reviewed before it is published. Besides, a second look at the vault credentials pays off. Notably, our team writes about the access scopes in plain words.

  • Who stores refresh tokens, and where are they kept?
  • Can your application read a token, or only request a short-lived one?
  • What happens to a connection when a refresh fails?
  • Who is told, and how fast, when a customer revokes access?
  • How do you end a connection, and what is left behind afterward?
  • Can you export an audit trail of token use?

A vendor may answer some of these on a public page and leave others open. Treat a missing answer as a question for the sales engineer, not as a yes or a no. Likewise, the same applies to your own team. Indeed, if nobody can say where the refresh tokens live today, that is your first finding.

DaletPipe workspace index screen
For example, the workspace index screen of DaletPipe.

Why should custody be a design decision for your team?

CRM credential custody is cheap to design early and costly to fix late. In addition, choose one owner for tokens. Besides, use grants when users can consent and stored keys when machines must sign.

Every change is reviewed by a second person. Also, a short record is kept for each decision.

Notes on the CRM credential custody are dated and reviewed by a second person. Each page on the re-consent flow is reviewed before it is published.

Our team writes about the CRM credential custody in plain words. Moreover, short answers on the connection row are kept up to date. Likewise, people new to the re-consent flow should start with the guides.

Teams often ask us about the vault credentials in practice. Every claim about the vault credentials is checked against the code. Readers often return to the access scopes when plans change.

Keep applications on coordinates, and let a broker handle refresh. Good CRM credential custody is mostly discipline.

Then test the unhappy paths of your CRM credential custody plan. Revoke a grant in a sandbox and watch what stops. Expire a token in the middle of a run. Decommission a test connection and check that nothing still holds access.

Run these tests on your own sandbox accounts as well. The evaluation checklist for unified CRM APIs asks each tool you compare the same custody questions.

A diagram of three stacked layers, from the first at the top: Connection row, Refresh token, Re-consent.

Questions and answers on this topic from the product team

What is CRM credential custody?

CRM credential custody is the question of who stores, refreshes and revokes the tokens and keys that open a customer's CRM. Good custody means one named owner, no stray copies and a tested way to cut access. It is a design choice you make once and live with for every connection.

Should an app store CRM tokens in its own database?

Avoid it when you can; each stored token becomes another secret to encrypt, rotate and clear on shutdown. A broker that owns tokens lets your app ask for a fresh one when needed. DaletPipe follows this pattern and keeps only coordinates in its connection row.

When should I use an API key instead of OAuth?

Use a stored key or client secret when no person is present to approve access, such as a back office job on a customer's own account. Use OAuth when the CRM supports it and a user can consent. DaletPipe labels these Nature C and Nature B.

What happens when a CRM grant is revoked?

The next refresh fails, and the integration must stop instead of retrying forever. DaletPipe asks DaletAuth for a fresh token and treats a conflict or a missing grant as a re-consent case. It marks the connection needs_reconsent, and a user then approves access again.

Does DaletPipe encrypt the outbound webhook secret?

Yes, the secret of a webhook subscription is sealed with AES-256-GCM before it is stored. It is separate from CRM tokens, which DaletAuth holds. Guard the sealing key, which comes from a deployment setting.

See how DaletPipe fits the providers your team uses today

Book a short meeting for a walkthrough with your own providers in mind, or join an in-person class to learn the method first.