Skip to content

Commit ff166c1

Browse files
authored
feat(credentials): saved credentials for Amplitude, Kalshi, Splunk, CB Insights, Railway, and Qdrant; fix Kalshi Ed25519 signing (#9927)
* fix(kalshi): sign requests with Ed25519 keys, the type Kalshi generates by default Kalshi picks the verification algorithm from the registered public key: Ed25519 over the pre-sign text, or RSA-PSS SHA-256 for an RSA key. The signer always passed the sha256 digest and PSS padding, which Node and Bun refuse for an Ed25519 key, so every authenticated call with a default key failed before it was sent. The key type is now read from the parsed key (a PKCS#8 RSA key shares the Ed25519 PEM header), and any other key type is refused. * feat(amplitude): saved project credential and a credential-only Amplitude block An Amplitude credential holds a project's API key, secret key, and data residency region, verified by listing the project's events on the region's Dashboard REST host with the Basic key pair the tools send (Amplitude answers 403 for either key being invalid). The region and key shapes are checked before any request. Each tool group maps only the params it declares: analytics tools take both keys and the region, ingestion tools the API key and region, and User Profile the secret key. The legacy block keeps its inline keys and is hidden from the toolbar in favor of amplitude_v2. * feat(kalshi): saved API key credential and a credential-only Kalshi block A Kalshi credential holds an API key ID and its private key, verified by a free balance read signed the way the tools sign every authenticated call; a key that cannot sign or a key ID that would break the header is refused before any request. The tools that sign requests map the key ID and private key from the credential, while market data stays public, so kalshi_v3 shows the credential picker only on account and trading operations. Token credential fields gain an optional multiline flag so the connect form keeps a pasted PEM key's line breaks. kalshi and kalshi_v2 keep their inline keys and now point at kalshi_v3. * feat(splunk): saved authentication token credential and a credential-only Splunk block A Splunk credential holds an authentication token and the management URL, verified by reading authentication/current-context (documented, no capability needed) through the guarded egress with the URL normalized as the tools build it; an answer without a user context is not taken as proof, and certificate verification is never relaxed. The tools send the token whenever one is set, so the credential policy marks the inline username and password as replaced by the token: tokenCredentialOAuth gains an optional list of such params, and the saved-credential contract accepts any token-filled param (not only accessToken) beside them. splunk keeps its inline connection fields and points at splunk_v2. * feat(cbinsights): saved API client credential and a credential-only CB Insights block A CB Insights credential holds the client ID and secret, verified by exchanging them at POST /v2/authorize, the call the tools make before their first request; a success without a token is not taken as proof, and the error body is never logged. The tools keep minting and caching their own token per run, so the credential fills the same client ID and secret they take inline. The lookup's profileUrl is request data sent to api.cbinsights.com, recorded as such in the saved-credential contract. cbinsights keeps its inline client fields and points at cbinsights_v2. * chore(audits): shrink the unused-exports baseline for exports now in use The Kalshi signer is exercised by its tests and the CB Insights API base by the saved credential check, so neither is unused any more. * test(credentials): cover a token-replaced sign-in whose token fills a param other than accessToken The saved-credential contract now accepts any credentialParams entry filled with the token beside tokenReplacesParams (Splunk's authToken), and names that in its error. * feat(railway): saved token credential, type-aware, and a credential-only Railway block A Railway credential holds a token, its type (account, workspace, or project), and for a workspace token the workspace ID. Each type is verified with the read Railway documents for its scope, since `me` answers only an account token: an account token reads `me`, a workspace token reads its workspace by ID (passed as a GraphQL variable), and a project token reads `projectToken` with the Project-Access-Token header the tools send for it. A GraphQL error or a body without the queried object is not taken as proof. The tools receive the token and its type, so a project token keeps its own header. Token credential fields gain an optional flag: an optional field is left out of the required create fields, the connect form does not require it and omits it when blank, and the secret builder stores it only when set. Existing descriptors declare no optional field, so their required fields and stored secrets are unchanged. railway keeps its inline token and points at railway_v2. * feat(qdrant): saved API key credential bound to its instance URL, and a credential-only Qdrant block A Qdrant credential holds a database API key and the instance URL, verified by listing collections (a read every key may run; a collection-scoped key sees a filtered list) with the api-key header the tools send, through the guarded egress with the URL normalized as the tools build it. An answer without a collection list is not taken as proof. The tools receive the key and the verified URL, so a run reaches only that instance. qdrant keeps its inline URL and optional key, which a self-hosted instance without an API key still needs, and points at qdrant_v2. The successor test matrix counts a field repeated per operation (Qdrant's URL) once. * fix(credentials): honor an optional domain field in the token secret builder The optional flag was honored by the create contract and connect form for any field, but the secret builder only applied it to the workspace ID and still required any domain field. Derive both the same way, and store a domain only when it is required or supplied. No descriptor marks a domain optional today, so stored secrets are unchanged. * fix(amplitude): send both saved keys to User Profile over Basic auth Amplitude's User Profile API documents only Basic authentication with the project API key and secret key. A saved Amplitude credential now fills the API key too, and the tool sends Basic auth whenever an API key is present. Inline calls that pass only the secret key keep the Api-Key header they sent before. * test(kalshi): keep only the signer cases that guard the key-type fix Drop the PKCS#1, query-string, literal newline and auth-header cases, which restate unchanged behavior or repeat the validator's Ed25519 check. * docs(amplitude): note that User Profile sends both saved keys in the v2 block TSDoc * fix(railway): require the workspace ID in the connect form once the token type is workspace * chore(audits): re-record the tool-registry boundary baseline for the new credential validators * fix(amplitude): default the saved credential's data residency to us
1 parent 4911dc1 commit ff166c1

124 files changed

Lines changed: 1990 additions & 500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/components/ui/icon-mapping.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
345345
algolia: AlgoliaIcon,
346346
algolia_v2: AlgoliaIcon,
347347
amplitude: AmplitudeIcon,
348+
amplitude_v2: AmplitudeIcon,
348349
api: ApiIcon,
349350
api_trigger: ApiIcon,
350351
apify: ApifyIcon,
@@ -380,6 +381,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
380381
calendly: CalendlyIcon,
381382
calendly_v2: CalendlyIcon,
382383
cbinsights: CbInsightsIcon,
384+
cbinsights_v2: CbInsightsIcon,
383385
chat_trigger: Task,
384386
checkr: CheckrIcon,
385387
checkr_v2: CheckrIcon,
@@ -569,6 +571,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
569571
jupyter_v3: JupyterIcon,
570572
kalshi: KalshiIcon,
571573
kalshi_v2: KalshiIcon,
574+
kalshi_v3: KalshiIcon,
572575
ketch: KetchIcon,
573576
knowledge: PackageSearchIcon,
574577
lambda: LambdaIcon,
@@ -674,6 +677,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
674677
pulse_v2: PulseIcon,
675678
pulse_v3: PulseIcon,
676679
qdrant: QdrantIcon,
680+
qdrant_v2: QdrantIcon,
677681
quartr: QuartrIcon,
678682
quartr_v2: QuartrIcon,
679683
quickbooks: QuickBooksIcon,
@@ -682,6 +686,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
682686
quiver_v3: QuiverIcon,
683687
rabbitmq: RabbitmqIcon,
684688
railway: RailwayIcon,
689+
railway_v2: RailwayIcon,
685690
ramp: RampIcon,
686691
rb2b: RB2BIcon,
687692
rb2b_v2: RB2BIcon,
@@ -746,6 +751,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
746751
smtp: SmtpIcon,
747752
snowflake: SnowflakeIcon,
748753
splunk: SplunkIcon,
754+
splunk_v2: SplunkIcon,
749755
sportmonks: SportmonksIcon,
750756
sportmonks_v2: SportmonksIcon,
751757
sqs: SQSIcon,

‎apps/docs/content/docs/integrations/amplitude.mdx‎

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Amplitude
33
description: Track events and query analytics from Amplitude
44
integration:
5-
type: "amplitude"
5+
type: "amplitude_v2"
66
color: "#13294B"
77
---
88

@@ -11,6 +11,8 @@ import { ReferenceDetails } from "@/components/ui/reference-details"
1111

1212
{/* MANUAL-CONTENT-START:intro */}
1313
Use [Amplitude](https://amplitude.com/) to send events, update user and group properties, and query product analytics from a workflow. The HTTP and Dashboard REST APIs use API-key and secret-key authentication.
14+
15+
Connect an Amplitude project once as an Amplitude credential: in Amplitude, open **Settings > Projects**, choose the project, and copy the **API key** and **secret key** from its **General** tab. Enter `eu` as the data residency only for a project hosted in Amplitude's EU data center. Sim checks the pair by listing the project's events, a read with no billing cost. Event and identify operations send the API key, analytics operations and **User Profile** send both keys; User Profile is not available for EU projects. Workflows built with the earlier Amplitude block keep the keys they entered in the block.
1416
{/* MANUAL-CONTENT-END */}
1517

1618
## Use the block [#usage-instructions]
@@ -29,7 +31,6 @@ Track an event in Amplitude using the HTTP V2 API.
2931

3032
| Parameter | Type | Required | Description |
3133
| --------- | ---- | -------- | ----------- |
32-
| `apiKey` | string | Yes | Amplitude API Key |
3334
| `userId` | string | No | User ID \(required if no device_id\) |
3435
| `deviceId` | string | No | Device ID \(required if no user_id\) |
3536
| `eventType` | string | Yes | Name of the event \(e.g., "page_view", "purchase"\) |
@@ -48,7 +49,6 @@ Track an event in Amplitude using the HTTP V2 API.
4849
| `revenue` | string | No | Revenue amount |
4950
| `productId` | string | No | Product identifier |
5051
| `revenueType` | string | No | Revenue type \(e.g., "purchase", "refund"\) |
51-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
5252

5353
#### Output
5454

@@ -71,11 +71,9 @@ Set user properties in Amplitude using the Identify API. Supports $set, $setOnce
7171

7272
| Parameter | Type | Required | Description |
7373
| --------- | ---- | -------- | ----------- |
74-
| `apiKey` | string | Yes | Amplitude API Key |
7574
| `userId` | string | No | User ID \(required if no device_id\) |
7675
| `deviceId` | string | No | Device ID \(required if no user_id\) |
7776
| `userProperties` | string | Yes | JSON object of user properties. Use operations like $set, $setOnce, $add, $append, $unset. |
78-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
7977

8078
#### Output
8179

@@ -96,11 +94,9 @@ Set group-level properties in Amplitude. Supports $set, $setOnce, $add, $append,
9694

9795
| Parameter | Type | Required | Description |
9896
| --------- | ---- | -------- | ----------- |
99-
| `apiKey` | string | Yes | Amplitude API Key |
10097
| `groupType` | string | Yes | Group classification \(e.g., "company", "org_id"\) |
10198
| `groupValue` | string | Yes | Specific group identifier \(e.g., "Acme Corp"\) |
10299
| `groupProperties` | string | Yes | JSON object of group properties. Use operations like $set, $setOnce, $add, $append, $unset. |
103-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
104100

105101
#### Output
106102

@@ -121,10 +117,7 @@ Search for a user by User ID, Device ID, or Amplitude ID using the Dashboard RES
121117

122118
| Parameter | Type | Required | Description |
123119
| --------- | ---- | -------- | ----------- |
124-
| `apiKey` | string | Yes | Amplitude API Key |
125-
| `secretKey` | string | Yes | Amplitude Secret Key |
126120
| `user` | string | Yes | User ID, Device ID, or Amplitude ID to search for |
127-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
128121

129122
#### Output
130123

@@ -147,13 +140,10 @@ Get the event stream for a specific user by their Amplitude ID.
147140

148141
| Parameter | Type | Required | Description |
149142
| --------- | ---- | -------- | ----------- |
150-
| `apiKey` | string | Yes | Amplitude API Key |
151-
| `secretKey` | string | Yes | Amplitude Secret Key |
152143
| `amplitudeId` | string | Yes | Amplitude internal user ID |
153144
| `offset` | string | No | Offset for pagination \(default 0\) |
154145
| `limit` | string | No | Maximum number of events to return \(default 1000, max 1000\) |
155146
| `direction` | string | No | Sort direction: "latest" or "earliest" \(default: latest\) |
156-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
157147

158148
#### Output
159149

@@ -190,7 +180,6 @@ Get a user profile including properties, cohort memberships, and computed proper
190180

191181
| Parameter | Type | Required | Description |
192182
| --------- | ---- | -------- | ----------- |
193-
| `secretKey` | string | Yes | Amplitude Secret Key |
194183
| `userId` | string | No | External user ID \(required if no device_id\) |
195184
| `deviceId` | string | No | Device ID \(required if no user_id\) |
196185
| `getAmpProps` | string | No | Include Amplitude user properties \(true/false, default: false\) |
@@ -219,8 +208,6 @@ Query event analytics data with segmentation. Get event counts, uniques, average
219208

220209
| Parameter | Type | Required | Description |
221210
| --------- | ---- | -------- | ----------- |
222-
| `apiKey` | string | Yes | Amplitude API Key |
223-
| `secretKey` | string | Yes | Amplitude Secret Key |
224211
| `eventType` | string | Yes | Event type name to analyze |
225212
| `start` | string | Yes | Start date in YYYYMMDD format |
226213
| `end` | string | Yes | End date in YYYYMMDD format |
@@ -232,7 +219,6 @@ Query event analytics data with segmentation. Get event counts, uniques, average
232219
| `filters` | string | No | JSON array of filter objects applied to the event, e.g. \[\{"subprop_type":"event","subprop_key":"city","subprop_op":"is","subprop_value":\["San Francisco"\]\}\] |
233220
| `formula` | string | No | Required when metric is "formula", e.g. "UNIQUES\(A\)/UNIQUES\(B\)" |
234221
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
235-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
236222

237223
#### Output
238224

@@ -255,15 +241,12 @@ Get active or new user counts over a date range from the Dashboard REST API.
255241

256242
| Parameter | Type | Required | Description |
257243
| --------- | ---- | -------- | ----------- |
258-
| `apiKey` | string | Yes | Amplitude API Key |
259-
| `secretKey` | string | Yes | Amplitude Secret Key |
260244
| `start` | string | Yes | Start date in YYYYMMDD format |
261245
| `end` | string | Yes | End date in YYYYMMDD format |
262246
| `metric` | string | No | Metric type: "active" or "new" \(default: active\) |
263247
| `interval` | string | No | Time interval: 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
264248
| `groupBy` | string | No | Property name to group by |
265249
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
266-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
267250

268251
#### Output
269252

@@ -285,9 +268,6 @@ Get real-time active user counts at 5-minute granularity for the last 2 days.
285268

286269
| Parameter | Type | Required | Description |
287270
| --------- | ---- | -------- | ----------- |
288-
| `apiKey` | string | Yes | Amplitude API Key |
289-
| `secretKey` | string | Yes | Amplitude Secret Key |
290-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
291271

292272
#### Output
293273

@@ -309,9 +289,6 @@ List all event types in the Amplitude project with their weekly totals and uniqu
309289

310290
| Parameter | Type | Required | Description |
311291
| --------- | ---- | -------- | ----------- |
312-
| `apiKey` | string | Yes | Amplitude API Key |
313-
| `secretKey` | string | Yes | Amplitude Secret Key |
314-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
315292

316293
#### Output
317294

@@ -338,15 +315,12 @@ Get revenue LTV data including ARPU, ARPPU, total revenue, and paying user count
338315

339316
| Parameter | Type | Required | Description |
340317
| --------- | ---- | -------- | ----------- |
341-
| `apiKey` | string | Yes | Amplitude API Key |
342-
| `secretKey` | string | Yes | Amplitude Secret Key |
343318
| `start` | string | Yes | Start date in YYYYMMDD format |
344319
| `end` | string | Yes | End date in YYYYMMDD format |
345320
| `metric` | string | No | Metric: 0 \(ARPU\), 1 \(ARPPU\), 2 \(Total Revenue\), 3 \(Paying Users\) |
346321
| `interval` | string | No | Time interval: 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
347322
| `groupBy` | string | No | Property name to group by \(limit: one\) |
348323
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
349-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
350324

351325
#### Output
352326

@@ -369,8 +343,6 @@ Analyze conversion rates and drop-off between a sequence of events.
369343

370344
| Parameter | Type | Required | Description |
371345
| --------- | ---- | -------- | ----------- |
372-
| `apiKey` | string | Yes | Amplitude API Key |
373-
| `secretKey` | string | Yes | Amplitude Secret Key |
374346
| `events` | string | Yes | JSON array of event objects, one per funnel step in order, e.g. \[\{"event_type":"signup"\},\{"event_type":"purchase"\}\] |
375347
| `start` | string | Yes | Start date in YYYYMMDD format |
376348
| `end` | string | Yes | End date in YYYYMMDD format |
@@ -381,7 +353,6 @@ Analyze conversion rates and drop-off between a sequence of events.
381353
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
382354
| `limit` | string | No | Maximum number of group-by values \(default: 100, max: 1000\) |
383355
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
384-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
385356

386357
#### Output
387358

@@ -408,8 +379,6 @@ Measure how many users return to perform an action after a starting action.
408379

409380
| Parameter | Type | Required | Description |
410381
| --------- | ---- | -------- | ----------- |
411-
| `apiKey` | string | Yes | Amplitude API Key |
412-
| `secretKey` | string | Yes | Amplitude Secret Key |
413382
| `startEvent` | string | Yes | JSON starting event object, e.g. \{"event_type":"_new"\} or \{"event_type":"_active"\} |
414383
| `returnEvent` | string | Yes | JSON returning event object, e.g. \{"event_type":"_all"\} or \{"event_type":"_active"\} |
415384
| `start` | string | Yes | Start date in YYYYMMDD format |
@@ -419,7 +388,6 @@ Measure how many users return to perform an action after a starting action.
419388
| `interval` | string | No | Time interval: 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
420389
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
421390
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
422-
| `dataResidency` | string | No | Data residency region: "us" \(default\) or "eu" |
423391

424392
#### Output
425393

0 commit comments

Comments
 (0)