Repository navigation
Commit e1a3f29
authored
feat(credentials): saved credentials for 21 token-and-host blocks on one host-aware check factory (#9849)
* refactor(credentials): host-aware token checks in the shared validator factory
tokenCheckValidator now takes a domain normalizer (stored as the credential's
domain), an account-id normalizer, an SSRF-guarded egress profile for hosts
the user chose, and a flag that keeps token-echoing error bodies out of logs.
GitLab becomes a declaration on it, so every token check reads the same way.
* feat(credentials): saved credentials for 20 token-and-host blocks
Algolia, Azure DevOps, Convex, Devin, Dynatrace, Email Bison, Grafana,
Infisical, Jotform, Jupyter (v3), Logfire, Mailgun, New Relic, Okta, Plane,
Supabase, Tinybird, Twilio SMS and Voice (one shared Twilio credential), and
Upstash get a credential that carries the token plus its host, region, or
account id, and a credential-only successor. Every host-deciding param comes
from the credential; a typed host is normalized as the tools do it and
verified through the guarded egress, a region or account id is checked
before any request, and Databricks subject tokens last up to an hour so
long Genie polls keep their token.
* feat(credentials): Thrive saved credential, and close the batch-3 audit findings
Thrive gets a credential holding its key, tenant id, and region host (one of
its four API hosts). Audit fixes: the connect form sends URL-shaped domains
as typed so the provider check keeps their scheme and path; credentials
default to a name with their domain or account id (GitLab keeps its token
name) and record it in the audit log; Upstash accepts http and a read-only
token refused PING; Infisical keeps http and a proxy path; Devin, Dynatrace,
and Logfire refuse dot segments, non-http schemes, and mistyped regions.
* improvement(credentials): simplify and clean up the token-and-host checks
One normalizeHttpBaseUrl and one allowedDomain replace five URL normalizers
and four region checks (fixing Grafana and Tinybird treating a non-http
scheme as a host); region tables come from the tools; acceptsBody can name
the credential (GitLab); Email Bison and Jupyter refuse credentials in the
URL instead of dropping them; the Supabase public-URL policy is inlined; the
Databricks token lifetime uses the issuer's cap.
* fix(credentials): address review round 1
Azure DevOps tools build every project-scoped URL through one traversal-safe
helper, so a project or build id can't climb into another organization with a
saved token; Tinybird and Upstash restricted-token replies are covered by
tests.
* fix(credentials): address the final audit
An Azure DevOps project or organization pasted already encoded is decoded
once before the traversal-safe segment, so it isn't encoded twice; a base
URL with a single-slash scheme is refused; Upstash accepts a proxy path like
the legacy block; a Thrive tenant id must be printable ASCII.
* docs(skills): teach the saved token credential pattern in the integration skills
add-integration, add-block, add-tools, and validate-integration now describe
the token credential (descriptor, tokenCheckValidator declaration with its
host and account normalizers, shared policy mapping every host-deciding
param) and credential-only successors for blocks that take a secret inline.
* docs(skills): address review round 2
The token-credential skill steps name the real tokenCredentialOAuth factory,
scope the checklist to token-credential and successor blocks, and keep the
AuthMode.ApiKey path for token-only blocks; normalizeEmailBisonBaseUrl gains
its TSDoc.
* fix(credentials): refuse an Email Bison instance typed with a non-https scheme
normalizeEmailBisonBaseUrl now keeps any typed scheme, so ftp://host is
refused instead of becoming a host named ftp.
* fix(credentials): close release-audit findings in the saved-credential executor
- A policy that maps credential fields owns them: the generic domain,
instanceUrl, apiDomain and cloudId fills no longer write a stored host
into a same-named user param (Thrive create/update user sent its region
host as the user's domain).
- An agent tool with a saved credential selected is neither asked for nor
allowed to send the params the credential supplies (Azure DevOps
organization, Infisical base URL).
- ENOTFOUND is read from the error or its cause, so a mistyped host or
account id is site_not_found under Bun as well as Node.
- A service-account secret is released only to a tool bound to its
provider; a bare credential ID is refused.
* fix(credentials): refuse non-http schemes on typed hosts; correct docs and copy
- One refuseUnsafeTypedUrl guard refuses a typed instance URL with
credentials or a non-http(s) scheme, for Email Bison, Jupyter and
Logfire, before their normalizers can read the scheme as a host. The
Email Bison tool normalizer is back to its staging behavior; the check
lives in the credential validator, so legacy blocks are unchanged.
- Docs for successor users: Jotform region, Dynatrace scopes, Logfire
host, Plane instance, Infisical, Fathom and Supabase now point at the
saved credential; self-hosting no longer says API keys live in blocks;
the AWS keyless step names the dialog's Issuer.
- ElevenLabs and Instantly copy no longer asks for a permission their
checks don't need; Okta lists trexcloud.com.1 parent 1174092 commit e1a3f29
519 files changed
Lines changed: 4058 additions & 1229 deletions
File tree
- .agents/skills
- add-block
- add-integration
- add-tools
- validate-integration
- apps
- docs
- components/ui
- content/docs
- integrations
- platform/self-hosting
- sim
- app/workspace/[workspaceId]/integrations/components/connect-service-account-modal
- blocks
- blocks
- lib
- block-metadata
- credentials
- token-service-accounts
- validators
- workload-identity
- integrations
- oauth
- permission-groups
- scripts
- serializer
- tools
- algolia
- azure_devops
- convex
- devin
- dynatrace
- emailbison
- generated
- grafana
- infisical
- jotform
- jupyter
- logfire
- mailgun
- new_relic
- okta
- plane
- supabase
- thrive
- tinybird
- twilio_voice
- twilio
- upstash
- packages/deployment-config/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
162 | 196 | | |
163 | 197 | | |
164 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
69 | 105 | | |
70 | 106 | | |
71 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
221 | 232 | | |
222 | 233 | | |
223 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
| |||
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| 408 | + | |
406 | 409 | | |
407 | 410 | | |
408 | 411 | | |
| |||
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
| 426 | + | |
423 | 427 | | |
424 | 428 | | |
425 | 429 | | |
| |||
435 | 439 | | |
436 | 440 | | |
437 | 441 | | |
| 442 | + | |
438 | 443 | | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| 449 | + | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
| |||
506 | 512 | | |
507 | 513 | | |
508 | 514 | | |
| 515 | + | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
| |||
537 | 544 | | |
538 | 545 | | |
539 | 546 | | |
| 547 | + | |
540 | 548 | | |
541 | 549 | | |
542 | 550 | | |
| |||
549 | 557 | | |
550 | 558 | | |
551 | 559 | | |
| 560 | + | |
552 | 561 | | |
553 | 562 | | |
554 | 563 | | |
| 564 | + | |
555 | 565 | | |
556 | 566 | | |
557 | 567 | | |
| |||
573 | 583 | | |
574 | 584 | | |
575 | 585 | | |
| 586 | + | |
576 | 587 | | |
577 | 588 | | |
578 | 589 | | |
| |||
583 | 594 | | |
584 | 595 | | |
585 | 596 | | |
| 597 | + | |
586 | 598 | | |
587 | 599 | | |
588 | 600 | | |
| |||
615 | 627 | | |
616 | 628 | | |
617 | 629 | | |
| 630 | + | |
618 | 631 | | |
619 | 632 | | |
620 | 633 | | |
621 | 634 | | |
622 | 635 | | |
623 | 636 | | |
| 637 | + | |
624 | 638 | | |
625 | 639 | | |
626 | 640 | | |
| |||
641 | 655 | | |
642 | 656 | | |
643 | 657 | | |
| 658 | + | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
| |||
743 | 758 | | |
744 | 759 | | |
745 | 760 | | |
| 761 | + | |
746 | 762 | | |
747 | 763 | | |
748 | 764 | | |
| |||
757 | 773 | | |
758 | 774 | | |
759 | 775 | | |
| 776 | + | |
760 | 777 | | |
761 | 778 | | |
| 779 | + | |
762 | 780 | | |
763 | 781 | | |
764 | 782 | | |
| |||
767 | 785 | | |
768 | 786 | | |
769 | 787 | | |
| 788 | + | |
770 | 789 | | |
| 790 | + | |
771 | 791 | | |
772 | 792 | | |
773 | 793 | | |
| 794 | + | |
774 | 795 | | |
775 | 796 | | |
776 | 797 | | |
| |||
0 commit comments