runline 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/oauth2.d.ts +7 -1
- package/dist/auth/oauth2.js +10 -0
- package/dist/auth/token.d.ts +1 -0
- package/dist/auth/token.js +19 -1
- package/dist/auth/types.d.ts +22 -1
- package/dist/core/engine.d.ts +7 -0
- package/dist/core/engine.js +9 -0
- package/dist/credentials/policy.d.ts +53 -1
- package/dist/credentials/policy.js +146 -6
- package/dist/credentials/registry.d.ts +9 -0
- package/dist/credentials/registry.js +179 -22
- package/dist/credentials/transport.d.ts +48 -2
- package/dist/credentials/transport.js +248 -70
- package/dist/credentials/types.d.ts +167 -10
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/plugin/api.d.ts +7 -0
- package/dist/plugin/api.js +7 -0
- package/dist/plugin/types.d.ts +12 -0
- package/dist/plugins/_shared/credentialAdapter.js +79 -15
- package/dist/plugins/_shared/credentials.js +389 -0
- package/dist/plugins/_shared/googleAuth.js +9 -40
- package/dist/plugins/_shared/googleCredentials.js +28 -7
- package/dist/plugins/_shared/microsoftAuth.js +13 -44
- package/dist/plugins/_shared/microsoftCredentials.js +30 -8
- package/dist/plugins/_shared/provider.js +2 -14
- package/dist/plugins/_shared/shiftCloud.js +19 -55
- package/dist/plugins/_shared/shiftCredentials.js +83 -0
- package/dist/plugins/actionNetwork/src/credentials.js +14 -0
- package/dist/plugins/actionNetwork/src/index.js +39 -50
- package/dist/plugins/activeCampaign/src/credentials.js +22 -0
- package/dist/plugins/activeCampaign/src/index.js +61 -132
- package/dist/plugins/adalo/src/credentials.js +16 -0
- package/dist/plugins/adalo/src/index.js +19 -43
- package/dist/plugins/affinity/src/credentials.js +19 -0
- package/dist/plugins/affinity/src/index.js +29 -54
- package/dist/plugins/agileCrm/src/credentials.js +16 -0
- package/dist/plugins/agileCrm/src/index.js +46 -112
- package/dist/plugins/airtable/src/credentials.js +19 -0
- package/dist/plugins/airtable/src/index.js +37 -50
- package/dist/plugins/airtop/src/credentials.js +20 -0
- package/dist/plugins/airtop/src/index.js +51 -75
- package/dist/plugins/apiTemplateIo/src/credentials.js +19 -0
- package/dist/plugins/apiTemplateIo/src/index.js +14 -31
- package/dist/plugins/asana/src/credentials.js +19 -0
- package/dist/plugins/asana/src/index.js +51 -72
- package/dist/plugins/autopilot/src/credentials.js +19 -0
- package/dist/plugins/autopilot/src/index.js +38 -45
- package/dist/plugins/bambooHr/src/credentials.js +16 -0
- package/dist/plugins/bambooHr/src/index.js +41 -67
- package/dist/plugins/bannerbear/src/credentials.js +19 -0
- package/dist/plugins/bannerbear/src/index.js +15 -27
- package/dist/plugins/baserow/src/credentials.js +17 -0
- package/dist/plugins/baserow/src/index.js +23 -49
- package/dist/plugins/beeminder/src/credentials.js +19 -0
- package/dist/plugins/beeminder/src/index.js +32 -54
- package/dist/plugins/bitly/src/credentials.js +19 -0
- package/dist/plugins/bitly/src/index.js +12 -26
- package/dist/plugins/bitwarden/src/credentials.js +62 -0
- package/dist/plugins/bitwarden/src/index.js +34 -80
- package/dist/plugins/box/src/credentials.js +19 -0
- package/dist/plugins/box/src/index.js +24 -49
- package/dist/plugins/brandfetch/src/credentials.js +13 -0
- package/dist/plugins/brandfetch/src/index.js +12 -17
- package/dist/plugins/brevo/src/credentials.js +19 -0
- package/dist/plugins/brevo/src/index.js +30 -51
- package/dist/plugins/bubble/src/credentials.js +28 -0
- package/dist/plugins/bubble/src/index.js +29 -65
- package/dist/plugins/chargebee/src/credentials.js +16 -0
- package/dist/plugins/chargebee/src/index.js +15 -45
- package/dist/plugins/circleci/src/credentials.js +19 -0
- package/dist/plugins/circleci/src/index.js +19 -39
- package/dist/plugins/ciscoWebex/src/credentials.js +19 -0
- package/dist/plugins/ciscoWebex/src/index.js +43 -61
- package/dist/plugins/clearbit/src/credentials.js +22 -0
- package/dist/plugins/clearbit/src/index.js +11 -21
- package/dist/plugins/clickup/src/credentials.js +19 -0
- package/dist/plugins/clickup/src/index.js +85 -117
- package/dist/plugins/clockify/src/credentials.js +19 -0
- package/dist/plugins/clockify/src/index.js +46 -61
- package/dist/plugins/cloudflare/src/credentials.js +19 -0
- package/dist/plugins/cloudflare/src/index.js +19 -34
- package/dist/plugins/cockpit/src/credentials.js +17 -0
- package/dist/plugins/cockpit/src/index.js +18 -31
- package/dist/plugins/coda/src/credentials.js +19 -0
- package/dist/plugins/coda/src/index.js +33 -50
- package/dist/plugins/coingecko/src/credentials.js +20 -0
- package/dist/plugins/coingecko/src/index.js +24 -34
- package/dist/plugins/contentful/src/credentials.js +26 -0
- package/dist/plugins/contentful/src/index.js +19 -40
- package/dist/plugins/convertkit/src/credentials.js +26 -0
- package/dist/plugins/convertkit/src/index.js +27 -45
- package/dist/plugins/copper/src/credentials.js +17 -0
- package/dist/plugins/copper/src/index.js +25 -47
- package/dist/plugins/cortex/src/credentials.js +28 -0
- package/dist/plugins/cortex/src/index.js +26 -49
- package/dist/plugins/currents/src/credentials.js +19 -0
- package/dist/plugins/currents/src/index.js +46 -59
- package/dist/plugins/customerIo/src/credentials.js +52 -0
- package/dist/plugins/customerIo/src/index.js +30 -58
- package/dist/plugins/databricks/src/credentials.js +13 -0
- package/dist/plugins/databricks/src/index.js +51 -103
- package/dist/plugins/deepl/src/credentials.js +19 -0
- package/dist/plugins/deepl/src/index.js +13 -39
- package/dist/plugins/demio/src/credentials.js +26 -0
- package/dist/plugins/demio/src/index.js +17 -41
- package/dist/plugins/dhl/src/credentials.js +13 -0
- package/dist/plugins/dhl/src/index.js +8 -19
- package/dist/plugins/discord/src/credentials.js +19 -0
- package/dist/plugins/discord/src/index.js +30 -58
- package/dist/plugins/discourse/src/credentials.js +18 -0
- package/dist/plugins/discourse/src/index.js +36 -53
- package/dist/plugins/disqus/src/credentials.js +13 -0
- package/dist/plugins/disqus/src/index.js +14 -32
- package/dist/plugins/drift/src/credentials.js +13 -0
- package/dist/plugins/drift/src/index.js +16 -26
- package/dist/plugins/dropbox/src/credentials.js +13 -0
- package/dist/plugins/dropbox/src/index.js +23 -30
- package/dist/plugins/dropcontact/src/credentials.js +13 -0
- package/dist/plugins/dropcontact/src/index.js +13 -18
- package/dist/plugins/egoi/src/credentials.js +19 -0
- package/dist/plugins/egoi/src/index.js +23 -38
- package/dist/plugins/elasticsearch/src/credentials.js +18 -0
- package/dist/plugins/elasticsearch/src/index.js +27 -48
- package/dist/plugins/elevenlabs/src/credentials.js +30 -0
- package/dist/plugins/elevenlabs/src/index.js +4 -1
- package/dist/plugins/elevenlabs/src/schemas.js +2 -1
- package/dist/plugins/elevenlabs/src/shared.js +74 -35
- package/dist/plugins/elevenlabs/src/workflows.js +2 -2
- package/dist/plugins/emelia/src/credentials.js +14 -0
- package/dist/plugins/emelia/src/index.js +19 -23
- package/dist/plugins/erpnext/src/credentials.js +27 -0
- package/dist/plugins/erpnext/src/index.js +21 -42
- package/dist/plugins/facebookGraph/src/credentials.js +20 -0
- package/dist/plugins/facebookGraph/src/index.js +39 -37
- package/dist/plugins/fal/src/credentials.js +14 -0
- package/dist/plugins/fal/src/index.js +4 -2
- package/dist/plugins/fal/src/shared.js +58 -63
- package/dist/plugins/freshdesk/src/credentials.js +20 -0
- package/dist/plugins/freshdesk/src/index.js +25 -46
- package/dist/plugins/freshservice/src/credentials.js +16 -0
- package/dist/plugins/freshservice/src/index.js +37 -58
- package/dist/plugins/freshworksCrm/src/credentials.js +16 -0
- package/dist/plugins/freshworksCrm/src/index.js +20 -39
- package/dist/plugins/getresponse/src/credentials.js +22 -0
- package/dist/plugins/getresponse/src/index.js +20 -32
- package/dist/plugins/gett/src/credentials.js +64 -0
- package/dist/plugins/gett/src/index.js +11 -6
- package/dist/plugins/gett/src/login.js +24 -0
- package/dist/plugins/gett/src/session.js +15 -38
- package/dist/plugins/gett/src/shared.js +41 -84
- package/dist/plugins/ghost/src/credentials.js +36 -0
- package/dist/plugins/ghost/src/index.js +18 -59
- package/dist/plugins/github/src/credentials.js +18 -0
- package/dist/plugins/github/src/index.js +55 -78
- package/dist/plugins/gitlab/src/credentials.js +24 -0
- package/dist/plugins/gitlab/src/index.js +29 -48
- package/dist/plugins/gmail/src/index.js +26 -24
- package/dist/plugins/gong/src/credentials.js +16 -0
- package/dist/plugins/gong/src/index.js +16 -32
- package/dist/plugins/googleAppsScript/src/index.js +108 -42
- package/dist/plugins/googleCalendar/src/index.js +15 -13
- package/dist/plugins/googleContacts/src/index.js +12 -9
- package/dist/plugins/googleDocs/src/index.js +2 -0
- package/dist/plugins/googleDocs/src/shared.js +2 -1
- package/dist/plugins/googleDrive/src/index.js +50 -53
- package/dist/plugins/googleImage/src/credentials.js +14 -0
- package/dist/plugins/googleImage/src/index.js +14 -25
- package/dist/plugins/googleSheets/src/index.js +26 -27
- package/dist/plugins/googleSlides/src/index.js +6 -4
- package/dist/plugins/googleTasks/src/index.js +13 -11
- package/dist/plugins/gotify/src/credentials.js +32 -0
- package/dist/plugins/gotify/src/index.js +14 -36
- package/dist/plugins/gotowebinar/src/credentials.js +13 -0
- package/dist/plugins/gotowebinar/src/index.js +52 -69
- package/dist/plugins/grafana/src/credentials.js +16 -0
- package/dist/plugins/grafana/src/index.js +34 -53
- package/dist/plugins/graphql/src/credentials.js +42 -0
- package/dist/plugins/graphql/src/index.js +21 -46
- package/dist/plugins/grist/src/credentials.js +30 -0
- package/dist/plugins/grist/src/index.js +14 -43
- package/dist/plugins/halopsa/src/credentials.js +56 -0
- package/dist/plugins/halopsa/src/index.js +20 -47
- package/dist/plugins/harvest/src/credentials.js +20 -0
- package/dist/plugins/harvest/src/index.js +24 -43
- package/dist/plugins/helpscout/src/credentials.js +13 -0
- package/dist/plugins/helpscout/src/index.js +26 -38
- package/dist/plugins/highlevel/src/credentials.js +19 -0
- package/dist/plugins/highlevel/src/index.js +34 -63
- package/dist/plugins/homeAssistant/src/credentials.js +27 -0
- package/dist/plugins/homeAssistant/src/index.js +34 -52
- package/dist/plugins/hubspot/src/credentials.js +16 -0
- package/dist/plugins/hubspot/src/index.js +29 -41
- package/dist/plugins/humanticAi/src/credentials.js +13 -0
- package/dist/plugins/humanticAi/src/index.js +15 -22
- package/dist/plugins/hunter/src/credentials.js +13 -0
- package/dist/plugins/hunter/src/index.js +18 -17
- package/dist/plugins/intercom/src/credentials.js +19 -0
- package/dist/plugins/intercom/src/index.js +25 -38
- package/dist/plugins/iterable/src/credentials.js +17 -0
- package/dist/plugins/iterable/src/index.js +26 -40
- package/dist/plugins/jenkins/src/credentials.js +16 -0
- package/dist/plugins/jenkins/src/index.js +22 -36
- package/dist/plugins/jira/src/credentials.js +16 -0
- package/dist/plugins/jira/src/index.js +35 -61
- package/dist/plugins/keap/src/credentials.js +19 -0
- package/dist/plugins/keap/src/index.js +43 -71
- package/dist/plugins/kobotoolbox/src/credentials.js +13 -0
- package/dist/plugins/kobotoolbox/src/index.js +46 -84
- package/dist/plugins/lemlist/src/credentials.js +19 -0
- package/dist/plugins/lemlist/src/index.js +35 -47
- package/dist/plugins/linear/src/attachments.js +7 -7
- package/dist/plugins/linear/src/comments.js +7 -7
- package/dist/plugins/linear/src/credentials.js +17 -0
- package/dist/plugins/linear/src/cycles.js +5 -5
- package/dist/plugins/linear/src/index.js +2 -0
- package/dist/plugins/linear/src/initiatives.js +6 -6
- package/dist/plugins/linear/src/issues.js +14 -14
- package/dist/plugins/linear/src/labels.js +6 -6
- package/dist/plugins/linear/src/organization.js +2 -2
- package/dist/plugins/linear/src/projects.js +12 -12
- package/dist/plugins/linear/src/shared.js +34 -32
- package/dist/plugins/linear/src/states.js +3 -3
- package/dist/plugins/linear/src/teams.js +4 -4
- package/dist/plugins/linear/src/users.js +3 -3
- package/dist/plugins/linear/src/views.js +5 -5
- package/dist/plugins/linear/src/webhooks.js +5 -5
- package/dist/plugins/lingvanex/src/credentials.js +13 -0
- package/dist/plugins/lingvanex/src/index.js +7 -9
- package/dist/plugins/linkedin/src/credentials.js +17 -0
- package/dist/plugins/linkedin/src/index.js +13 -17
- package/dist/plugins/lonescale/src/credentials.js +13 -0
- package/dist/plugins/lonescale/src/index.js +16 -26
- package/dist/plugins/magento/src/credentials.js +16 -0
- package/dist/plugins/magento/src/index.js +67 -84
- package/dist/plugins/mailcheck/src/credentials.js +17 -0
- package/dist/plugins/mailcheck/src/index.js +7 -9
- package/dist/plugins/mailchimp/src/credentials.js +32 -0
- package/dist/plugins/mailchimp/src/index.js +36 -44
- package/dist/plugins/mailerlite/src/credentials.js +13 -0
- package/dist/plugins/mailerlite/src/index.js +19 -32
- package/dist/plugins/mailgun/src/credentials.js +21 -0
- package/dist/plugins/mailgun/src/index.js +15 -21
- package/dist/plugins/mailjet/src/credentials.js +38 -0
- package/dist/plugins/mailjet/src/index.js +60 -115
- package/dist/plugins/mandrill/src/credentials.js +17 -0
- package/dist/plugins/mandrill/src/index.js +11 -12
- package/dist/plugins/marketstack/src/credentials.js +16 -0
- package/dist/plugins/marketstack/src/index.js +18 -28
- package/dist/plugins/matrix/src/credentials.js +19 -0
- package/dist/plugins/matrix/src/index.js +23 -52
- package/dist/plugins/mattermost/src/credentials.js +19 -0
- package/dist/plugins/mattermost/src/index.js +41 -73
- package/dist/plugins/mautic/src/credentials.js +16 -0
- package/dist/plugins/mautic/src/index.js +46 -62
- package/dist/plugins/medium/src/credentials.js +20 -0
- package/dist/plugins/medium/src/index.js +18 -23
- package/dist/plugins/messagebird/src/credentials.js +22 -0
- package/dist/plugins/messagebird/src/index.js +13 -18
- package/dist/plugins/metabase/src/credentials.js +19 -0
- package/dist/plugins/metabase/src/index.js +24 -40
- package/dist/plugins/microsoftCalendar/src/index.js +48 -12
- package/dist/plugins/microsoftFiles/src/index.js +90 -25
- package/dist/plugins/microsoftMail/src/index.js +62 -15
- package/dist/plugins/misp/src/credentials.js +16 -0
- package/dist/plugins/misp/src/index.js +60 -71
- package/dist/plugins/mocean/src/credentials.js +17 -0
- package/dist/plugins/mocean/src/index.js +11 -23
- package/dist/plugins/monday/src/credentials.js +14 -0
- package/dist/plugins/monday/src/index.js +31 -44
- package/dist/plugins/monicaCrm/src/credentials.js +19 -0
- package/dist/plugins/monicaCrm/src/index.js +25 -42
- package/dist/plugins/msg91/src/credentials.js +10 -0
- package/dist/plugins/msg91/src/index.js +15 -11
- package/dist/plugins/nasa/src/credentials.js +22 -0
- package/dist/plugins/nasa/src/index.js +24 -28
- package/dist/plugins/netlify/src/credentials.js +19 -0
- package/dist/plugins/netlify/src/index.js +27 -51
- package/dist/plugins/netscalerAdc/src/credentials.js +18 -0
- package/dist/plugins/netscalerAdc/src/index.js +16 -31
- package/dist/plugins/nextcloud/src/credentials.js +27 -0
- package/dist/plugins/nextcloud/src/index.js +55 -109
- package/dist/plugins/nocodb/src/credentials.js +16 -0
- package/dist/plugins/nocodb/src/index.js +19 -37
- package/dist/plugins/notion/src/credentials.js +21 -0
- package/dist/plugins/notion/src/index.js +25 -38
- package/dist/plugins/npm/src/credentials.js +19 -0
- package/dist/plugins/npm/src/index.js +22 -32
- package/dist/plugins/odoo/src/credentials.js +21 -0
- package/dist/plugins/odoo/src/index.js +53 -69
- package/dist/plugins/okta/src/credentials.js +23 -0
- package/dist/plugins/okta/src/index.js +30 -35
- package/dist/plugins/oneSimpleApi/src/credentials.js +16 -0
- package/dist/plugins/oneSimpleApi/src/index.js +19 -24
- package/dist/plugins/onfleet/src/credentials.js +23 -0
- package/dist/plugins/onfleet/src/index.js +42 -53
- package/dist/plugins/openai/src/credentials.js +13 -0
- package/dist/plugins/openai/src/index.js +15 -23
- package/dist/plugins/openweathermap/src/credentials.js +16 -0
- package/dist/plugins/openweathermap/src/index.js +22 -22
- package/dist/plugins/oura/src/credentials.js +19 -0
- package/dist/plugins/oura/src/index.js +13 -18
- package/dist/plugins/paddle/src/credentials.js +27 -0
- package/dist/plugins/paddle/src/index.js +20 -36
- package/dist/plugins/pagerduty/src/credentials.js +24 -0
- package/dist/plugins/pagerduty/src/index.js +30 -39
- package/dist/plugins/parallel/src/credentials.js +18 -0
- package/dist/plugins/parallel/src/index.js +16 -22
- package/dist/plugins/paypal/src/credentials.js +44 -0
- package/dist/plugins/paypal/src/index.js +14 -40
- package/dist/plugins/peekalink/src/credentials.js +16 -0
- package/dist/plugins/peekalink/src/index.js +10 -11
- package/dist/plugins/phantombuster/src/credentials.js +19 -0
- package/dist/plugins/phantombuster/src/index.js +19 -32
- package/dist/plugins/philipsHue/src/credentials.js +17 -0
- package/dist/plugins/philipsHue/src/index.js +15 -27
- package/dist/plugins/pipedrive/src/credentials.js +26 -0
- package/dist/plugins/pipedrive/src/index.js +43 -73
- package/dist/plugins/plaud/src/index.js +2 -1
- package/dist/plugins/plaud/src/shared.js +23 -19
- package/dist/plugins/plivo/src/credentials.js +20 -0
- package/dist/plugins/plivo/src/index.js +13 -19
- package/dist/plugins/posthog/src/credentials.js +18 -0
- package/dist/plugins/posthog/src/index.js +14 -20
- package/dist/plugins/profitwell/src/credentials.js +22 -0
- package/dist/plugins/profitwell/src/index.js +10 -17
- package/dist/plugins/pushbullet/src/credentials.js +19 -0
- package/dist/plugins/pushbullet/src/index.js +19 -27
- package/dist/plugins/pushcut/src/credentials.js +19 -0
- package/dist/plugins/pushcut/src/index.js +7 -8
- package/dist/plugins/pushover/src/credentials.js +14 -0
- package/dist/plugins/pushover/src/index.js +7 -12
- package/dist/plugins/quickbase/src/credentials.js +15 -0
- package/dist/plugins/quickbase/src/index.js +24 -34
- package/dist/plugins/quickbooks/src/credentials.js +22 -0
- package/dist/plugins/quickbooks/src/index.js +17 -46
- package/dist/plugins/raindrop/src/credentials.js +19 -0
- package/dist/plugins/raindrop/src/index.js +30 -32
- package/dist/plugins/recraft/src/credentials.js +13 -0
- package/dist/plugins/recraft/src/index.js +38 -27
- package/dist/plugins/reddit/src/credentials.js +26 -0
- package/dist/plugins/reddit/src/index.js +30 -34
- package/dist/plugins/replicate/src/credentials.js +23 -0
- package/dist/plugins/replicate/src/index.js +17 -27
- package/dist/plugins/rocketchat/src/credentials.js +17 -0
- package/dist/plugins/rocketchat/src/index.js +8 -19
- package/dist/plugins/rundeck/src/credentials.js +16 -0
- package/dist/plugins/rundeck/src/index.js +12 -28
- package/dist/plugins/salesforce/src/credentials.js +73 -0
- package/dist/plugins/salesforce/src/index.js +6 -0
- package/dist/plugins/salesforce/src/metadata.js +3 -16
- package/dist/plugins/salesforce/src/shared.js +25 -100
- package/dist/plugins/salesforce/src/sobjects.js +10 -9
- package/dist/plugins/salesmate/src/credentials.js +17 -0
- package/dist/plugins/salesmate/src/index.js +20 -37
- package/dist/plugins/securityScorecard/src/credentials.js +22 -0
- package/dist/plugins/securityScorecard/src/index.js +24 -37
- package/dist/plugins/segment/src/credentials.js +16 -0
- package/dist/plugins/segment/src/index.js +12 -16
- package/dist/plugins/sendgrid/src/credentials.js +13 -0
- package/dist/plugins/sendgrid/src/index.js +31 -35
- package/dist/plugins/sendy/src/credentials.js +18 -0
- package/dist/plugins/sendy/src/index.js +18 -24
- package/dist/plugins/sentry/src/credentials.js +16 -0
- package/dist/plugins/sentry/src/index.js +30 -98
- package/dist/plugins/servicenow/src/credentials.js +13 -0
- package/dist/plugins/servicenow/src/index.js +22 -41
- package/dist/plugins/shiftAtlas/src/graph.js +2 -2
- package/dist/plugins/shiftAtlas/src/index.js +2 -0
- package/dist/plugins/shiftAtlas/src/shared.js +3 -1
- package/dist/plugins/shiftBwm/src/index.js +4 -2
- package/dist/plugins/shiftBwm/src/shared.js +41 -16
- package/dist/plugins/shiftCrm/src/access.js +2 -2
- package/dist/plugins/shiftCrm/src/accounts.js +3 -3
- package/dist/plugins/shiftCrm/src/activities.js +3 -3
- package/dist/plugins/shiftCrm/src/credentials.js +6 -0
- package/dist/plugins/shiftCrm/src/index.js +2 -0
- package/dist/plugins/shiftCrm/src/opportunities.js +3 -3
- package/dist/plugins/shiftCrm/src/people.js +3 -3
- package/dist/plugins/shiftCrm/src/records.js +2 -2
- package/dist/plugins/shiftCrm/src/shared.js +2 -1
- package/dist/plugins/shiftCrm/src/tasks.js +3 -3
- package/dist/plugins/shiftObjects/src/credentials.js +2 -0
- package/dist/plugins/shiftObjects/src/index.js +2 -0
- package/dist/plugins/shiftObjects/src/objects.js +3 -2
- package/dist/plugins/shiftOcr/src/credentials.js +8 -0
- package/dist/plugins/shiftOcr/src/index.js +6 -5
- package/dist/plugins/shiftPages/src/index.js +2 -0
- package/dist/plugins/shiftPages/src/pages.js +5 -3
- package/dist/plugins/shiftPages/src/shared.js +3 -1
- package/dist/plugins/shiftTranscription/src/index.js +2 -0
- package/dist/plugins/shiftTranscription/src/shared.js +11 -1
- package/dist/plugins/shiftTranscription/src/transcription.js +4 -4
- package/dist/plugins/shiftWork/src/index.js +2 -0
- package/dist/plugins/shiftWork/src/issue-views.js +5 -5
- package/dist/plugins/shiftWork/src/issues.js +11 -7
- package/dist/plugins/shiftWork/src/projects.js +3 -3
- package/dist/plugins/shiftWork/src/shared.js +3 -1
- package/dist/plugins/shopify/src/credentials.js +16 -0
- package/dist/plugins/shopify/src/index.js +32 -59
- package/dist/plugins/signl4/src/credentials.js +17 -0
- package/dist/plugins/signl4/src/index.js +28 -29
- package/dist/plugins/slack/src/credentials.js +19 -0
- package/dist/plugins/slack/src/index.js +51 -60
- package/dist/plugins/sms77/src/credentials.js +17 -0
- package/dist/plugins/sms77/src/index.js +11 -16
- package/dist/plugins/splunk/src/credentials.js +19 -0
- package/dist/plugins/splunk/src/index.js +32 -74
- package/dist/plugins/spotify/src/credentials.js +19 -0
- package/dist/plugins/spotify/src/index.js +40 -55
- package/dist/plugins/stackby/src/credentials.js +13 -0
- package/dist/plugins/stackby/src/index.js +14 -23
- package/dist/plugins/steel/src/auth.js +27 -0
- package/dist/plugins/steel/src/browser.js +4 -3
- package/dist/plugins/steel/src/captchas.js +4 -3
- package/dist/plugins/steel/src/extensions.js +3 -2
- package/dist/plugins/steel/src/files.js +9 -10
- package/dist/plugins/steel/src/index.js +2 -0
- package/dist/plugins/steel/src/page/tools.js +3 -3
- package/dist/plugins/steel/src/profiles.js +4 -3
- package/dist/plugins/steel/src/sessions.js +13 -13
- package/dist/plugins/steel/src/shared.js +21 -51
- package/dist/plugins/storyblok/src/credentials.js +37 -0
- package/dist/plugins/storyblok/src/index.js +22 -66
- package/dist/plugins/strapi/src/credentials.js +71 -0
- package/dist/plugins/strapi/src/index.js +36 -70
- package/dist/plugins/strava/src/credentials.js +19 -0
- package/dist/plugins/strava/src/index.js +16 -33
- package/dist/plugins/stripe/src/credentials.js +19 -0
- package/dist/plugins/stripe/src/index.js +44 -58
- package/dist/plugins/supabase/src/credentials.js +30 -0
- package/dist/plugins/supabase/src/index.js +18 -40
- package/dist/plugins/syncromsp/src/credentials.js +16 -0
- package/dist/plugins/syncromsp/src/index.js +37 -70
- package/dist/plugins/tapfiliate/src/credentials.js +13 -0
- package/dist/plugins/tapfiliate/src/index.js +21 -31
- package/dist/plugins/telegram/src/credentials.js +20 -0
- package/dist/plugins/telegram/src/index.js +31 -39
- package/dist/plugins/thehive/src/credentials.js +14 -0
- package/dist/plugins/thehive/src/index.js +33 -50
- package/dist/plugins/thehiveProject/src/credentials.js +16 -0
- package/dist/plugins/thehiveProject/src/index.js +53 -122
- package/dist/plugins/todoist/src/credentials.js +26 -0
- package/dist/plugins/todoist/src/index.js +49 -79
- package/dist/plugins/together/src/credentials.js +16 -0
- package/dist/plugins/together/src/index.js +30 -32
- package/dist/plugins/travisci/src/credentials.js +24 -0
- package/dist/plugins/travisci/src/index.js +16 -30
- package/dist/plugins/trello/src/credentials.js +29 -0
- package/dist/plugins/trello/src/index.js +49 -64
- package/dist/plugins/twake/src/credentials.js +16 -0
- package/dist/plugins/twake/src/index.js +8 -10
- package/dist/plugins/twilio/src/credentials.js +23 -0
- package/dist/plugins/twilio/src/index.js +12 -26
- package/dist/plugins/twist/src/credentials.js +13 -0
- package/dist/plugins/twist/src/index.js +32 -44
- package/dist/plugins/twitter/src/credentials.js +16 -0
- package/dist/plugins/twitter/src/index.js +25 -37
- package/dist/plugins/typesafe/src/credentials.js +28 -0
- package/dist/plugins/typesafe/src/index.js +3 -1
- package/dist/plugins/typesafe/src/shared.js +23 -35
- package/dist/plugins/unleashedSoftware/src/credentials.js +21 -0
- package/dist/plugins/unleashedSoftware/src/index.js +13 -37
- package/dist/plugins/uplead/src/credentials.js +16 -0
- package/dist/plugins/uplead/src/index.js +11 -16
- package/dist/plugins/uproc/src/credentials.js +14 -0
- package/dist/plugins/uproc/src/index.js +7 -10
- package/dist/plugins/uptimerobot/src/credentials.js +14 -0
- package/dist/plugins/uptimerobot/src/index.js +28 -39
- package/dist/plugins/urlscanio/src/credentials.js +13 -0
- package/dist/plugins/urlscanio/src/index.js +13 -22
- package/dist/plugins/vercel/src/credentials.js +19 -0
- package/dist/plugins/vercel/src/deployments.js +27 -11
- package/dist/plugins/vercel/src/env.js +31 -12
- package/dist/plugins/vercel/src/index.js +2 -0
- package/dist/plugins/vercel/src/projects.js +6 -3
- package/dist/plugins/vercel/src/shared.js +32 -37
- package/dist/plugins/vero/src/credentials.js +17 -0
- package/dist/plugins/vero/src/index.js +18 -21
- package/dist/plugins/vonage/src/credentials.js +17 -0
- package/dist/plugins/vonage/src/index.js +14 -18
- package/dist/plugins/wekan/src/credentials.js +16 -0
- package/dist/plugins/wekan/src/index.js +33 -46
- package/dist/plugins/wolt/src/account.js +6 -0
- package/dist/plugins/wolt/src/catalog.js +2 -2
- package/dist/plugins/wolt/src/credentials.js +64 -0
- package/dist/plugins/wolt/src/index.js +8 -3
- package/dist/plugins/wolt/src/orders.js +2 -2
- package/dist/plugins/wolt/src/public.js +91 -0
- package/dist/plugins/wolt/src/shared.js +49 -158
- package/dist/plugins/woocommerce/src/credentials.js +16 -0
- package/dist/plugins/woocommerce/src/index.js +19 -37
- package/dist/plugins/wordpress/src/credentials.js +16 -0
- package/dist/plugins/wordpress/src/index.js +23 -42
- package/dist/plugins/xai/src/credentials.js +13 -0
- package/dist/plugins/xai/src/index.js +31 -30
- package/dist/plugins/xero/src/credentials.js +17 -0
- package/dist/plugins/xero/src/index.js +19 -36
- package/dist/plugins/yourls/src/credentials.js +17 -0
- package/dist/plugins/yourls/src/index.js +13 -23
- package/dist/plugins/zammad/src/credentials.js +15 -0
- package/dist/plugins/zammad/src/index.js +27 -47
- package/dist/plugins/zendesk/src/credentials.js +26 -0
- package/dist/plugins/zendesk/src/index.js +29 -48
- package/dist/plugins/zoho/src/credentials.js +17 -0
- package/dist/plugins/zoho/src/index.js +18 -38
- package/dist/plugins/zoom/src/credentials.js +19 -0
- package/dist/plugins/zoom/src/index.js +15 -30
- package/dist/plugins/zulip/src/credentials.js +16 -0
- package/dist/plugins/zulip/src/index.js +36 -42
- package/dist/sdk.d.ts +8 -0
- package/dist/sdk.js +3 -0
- package/package.json +1 -1
- package/dist/plugins/_shared/authedFetch.js +0 -33
- package/dist/plugins/_shared/tokenRefresh.js +0 -41
|
@@ -2,8 +2,8 @@ import * as t from "typebox";
|
|
|
2
2
|
import { Check } from "typebox/value";
|
|
3
3
|
import { AuthError } from "../auth/errors.js";
|
|
4
4
|
import { validateOAuth2ExchangePolicy } from "../auth/oauth2.js";
|
|
5
|
-
import { oauthEndpoint, providerParameters } from "../auth/token.js";
|
|
6
|
-
import { HTTP_METHODS, headerName, resourceUrl, targetBase } from "./policy.js";
|
|
5
|
+
import { oauthEndpoint, providerHeaders, providerParameters, } from "../auth/token.js";
|
|
6
|
+
import { bounded, HTTP_METHODS, headerName, injectedHeaders, injectedParams, injectedPointers, placementsFor, refuseCredentialParams, resourceUrl, TARGET_RESPONSE_LIMIT_BYTES, TARGET_TIMEOUT_LIMIT_MS, TRANSPORT_HEADERS, targetBase, targetOf, } from "./policy.js";
|
|
7
7
|
/** Normalized grant storage; application registration remains host-owned. */
|
|
8
8
|
export const OAuthTokensSchema = t.Object({
|
|
9
9
|
accessToken: t.String({ minLength: 1 }),
|
|
@@ -13,6 +13,18 @@ export const OAuthTokensSchema = t.Object({
|
|
|
13
13
|
tokenType: t.Optional(t.String({ minLength: 1 })),
|
|
14
14
|
metadata: t.Optional(t.Record(t.String(), t.String())),
|
|
15
15
|
}, { additionalProperties: false });
|
|
16
|
+
/**
|
|
17
|
+
* Stored shape of a static secret: exactly its named parts, each a string,
|
|
18
|
+
* the `optional` ones allowed to be absent. A Basic part may be empty (a
|
|
19
|
+
* key as the username with no password, or the reverse); the transport
|
|
20
|
+
* refuses an empty part anywhere else.
|
|
21
|
+
*/
|
|
22
|
+
export function staticSecretSchema(parts, optional = []) {
|
|
23
|
+
return t.Object(Object.fromEntries(parts.map((part) => [
|
|
24
|
+
part,
|
|
25
|
+
optional.includes(part) ? t.Optional(t.String()) : t.String(),
|
|
26
|
+
])), { additionalProperties: false });
|
|
27
|
+
}
|
|
16
28
|
export const OAuthGrantSchema = t.Object({
|
|
17
29
|
tokens: t.Partial(OAuthTokensSchema),
|
|
18
30
|
revision: t.String({ minLength: 1 }),
|
|
@@ -21,6 +33,109 @@ function identifier(value) {
|
|
|
21
33
|
if (typeof value !== "string" || !/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(value))
|
|
22
34
|
throw new AuthError("invalid_definition");
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* A static secret's parts and placements agree with each other, with the
|
|
38
|
+
* stored shape and with the method's targets: the stored field holds
|
|
39
|
+
* exactly the declared parts, each a string, required unless optional;
|
|
40
|
+
* every placement names a declared part and only declared targets; every
|
|
41
|
+
* part is placed; and on each target at least one placement signs, no
|
|
42
|
+
* header, query parameter or JSON pointer is claimed twice, and at most
|
|
43
|
+
* one part takes the one path position.
|
|
44
|
+
*/
|
|
45
|
+
function validateStatic(auth, stored, targets) {
|
|
46
|
+
const parts = auth.parts;
|
|
47
|
+
if (!Array.isArray(parts) ||
|
|
48
|
+
!parts.length ||
|
|
49
|
+
new Set(parts).size !== parts.length ||
|
|
50
|
+
!Array.isArray(auth.placements) ||
|
|
51
|
+
!auth.placements.length)
|
|
52
|
+
throw new AuthError("invalid_definition");
|
|
53
|
+
for (const part of parts)
|
|
54
|
+
identifier(part);
|
|
55
|
+
const optional = auth.optionalParts ?? [];
|
|
56
|
+
if (!Array.isArray(optional) ||
|
|
57
|
+
new Set(optional).size !== optional.length ||
|
|
58
|
+
optional.some((part) => !parts.includes(part)))
|
|
59
|
+
throw new AuthError("invalid_definition");
|
|
60
|
+
const shape = stored;
|
|
61
|
+
if (shape?.type !== "object" ||
|
|
62
|
+
shape.additionalProperties !== false ||
|
|
63
|
+
!shape.properties ||
|
|
64
|
+
Object.keys(shape.properties).sort().join() !== [...parts].sort().join() ||
|
|
65
|
+
Object.values(shape.properties).some((part) => part.type !== "string") ||
|
|
66
|
+
[...(shape.required ?? [])].sort().join() !==
|
|
67
|
+
parts
|
|
68
|
+
.filter((part) => !optional.includes(part))
|
|
69
|
+
.sort()
|
|
70
|
+
.join())
|
|
71
|
+
throw new AuthError("invalid_definition");
|
|
72
|
+
const used = new Set();
|
|
73
|
+
const place = (part) => {
|
|
74
|
+
if (typeof part !== "string" || !parts.includes(part))
|
|
75
|
+
throw new AuthError("invalid_definition");
|
|
76
|
+
used.add(part);
|
|
77
|
+
};
|
|
78
|
+
for (const placement of auth.placements) {
|
|
79
|
+
if (placement.targets !== undefined &&
|
|
80
|
+
(!Array.isArray(placement.targets) ||
|
|
81
|
+
!placement.targets.length ||
|
|
82
|
+
placement.targets.some((target) => !targets.includes(target))))
|
|
83
|
+
throw new AuthError("invalid_definition");
|
|
84
|
+
if (placement.in === "header" || placement.in === "jwt") {
|
|
85
|
+
place(placement.part);
|
|
86
|
+
headerName(placement.name);
|
|
87
|
+
if (placement.prefix !== undefined &&
|
|
88
|
+
(typeof placement.prefix !== "string" ||
|
|
89
|
+
!/^[\x21-\x7e][\x20-\x7e]{0,31}$/.test(placement.prefix)))
|
|
90
|
+
throw new AuthError("invalid_definition");
|
|
91
|
+
if (placement.in === "jwt" &&
|
|
92
|
+
(typeof placement.audience !== "string" ||
|
|
93
|
+
!/^[\x21-\x7e]{1,64}$/.test(placement.audience)))
|
|
94
|
+
throw new AuthError("invalid_definition");
|
|
95
|
+
}
|
|
96
|
+
else if (placement.in === "querySignature") {
|
|
97
|
+
place(placement.part);
|
|
98
|
+
headerName(placement.name);
|
|
99
|
+
}
|
|
100
|
+
else if (placement.in === "jsonPointer") {
|
|
101
|
+
place(placement.part);
|
|
102
|
+
if (typeof placement.pointer !== "string" ||
|
|
103
|
+
!/^(\/[A-Za-z0-9_.-]+)+$/.test(placement.pointer))
|
|
104
|
+
throw new AuthError("invalid_definition");
|
|
105
|
+
}
|
|
106
|
+
else if (placement.in === "query" || placement.in === "body") {
|
|
107
|
+
place(placement.part);
|
|
108
|
+
identifier(placement.name);
|
|
109
|
+
}
|
|
110
|
+
else if (placement.in === "path") {
|
|
111
|
+
place(placement.part);
|
|
112
|
+
if (placement.prefix !== undefined &&
|
|
113
|
+
(typeof placement.prefix !== "string" ||
|
|
114
|
+
!/^[A-Za-z0-9._~-]{1,32}$/.test(placement.prefix)))
|
|
115
|
+
throw new AuthError("invalid_definition");
|
|
116
|
+
}
|
|
117
|
+
else if (placement.in === "basic") {
|
|
118
|
+
place(placement.username);
|
|
119
|
+
place(placement.password);
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
throw new AuthError("invalid_definition");
|
|
123
|
+
}
|
|
124
|
+
if (used.size !== parts.length)
|
|
125
|
+
throw new AuthError("invalid_definition");
|
|
126
|
+
for (const target of targets) {
|
|
127
|
+
const placed = placementsFor(auth, target);
|
|
128
|
+
const headers = injectedHeaders(auth, target);
|
|
129
|
+
const params = injectedParams(auth, target).map((name) => name.toLowerCase());
|
|
130
|
+
const pointers = injectedPointers(auth, target);
|
|
131
|
+
if (!placed.length ||
|
|
132
|
+
new Set(headers).size !== headers.length ||
|
|
133
|
+
new Set(params).size !== params.length ||
|
|
134
|
+
new Set(pointers).size !== pointers.length ||
|
|
135
|
+
placed.filter((placement) => placement.in === "path").length > 1)
|
|
136
|
+
throw new AuthError("invalid_definition");
|
|
137
|
+
}
|
|
138
|
+
}
|
|
24
139
|
function validateMethod(method) {
|
|
25
140
|
const schema = method.schema;
|
|
26
141
|
if (schema.type !== "object" ||
|
|
@@ -28,18 +143,23 @@ function validateMethod(method) {
|
|
|
28
143
|
!schema.properties)
|
|
29
144
|
throw new AuthError("invalid_definition");
|
|
30
145
|
const auth = method.authentication;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
146
|
+
if (auth.kind === "none") {
|
|
147
|
+
// Nothing is stored for a method that signs nothing.
|
|
148
|
+
if (Object.keys(schema.properties).length)
|
|
149
|
+
throw new AuthError("invalid_definition");
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
identifier(auth.field);
|
|
153
|
+
if (!Object.hasOwn(schema.properties, auth.field))
|
|
154
|
+
throw new AuthError("invalid_definition");
|
|
155
|
+
}
|
|
156
|
+
if (auth.kind === "static")
|
|
157
|
+
validateStatic(auth, schema.properties[auth.field], Object.keys(method.targets ?? {}));
|
|
38
158
|
else if (auth.kind === "oauth2") {
|
|
39
159
|
identifier(auth.definition.id);
|
|
40
160
|
identifier(auth.definition.provider);
|
|
41
161
|
validateOAuth2ExchangePolicy(auth.definition.exchange);
|
|
42
|
-
if (!["refresh", "clientCredentials", "jwtBearer"].includes(auth.renewal) ||
|
|
162
|
+
if (!["refresh", "clientCredentials", "jwtBearer", "password"].includes(auth.renewal) ||
|
|
43
163
|
!auth.definition[auth.renewal])
|
|
44
164
|
throw new AuthError("invalid_definition");
|
|
45
165
|
if (auth.rejectionStatus !== undefined &&
|
|
@@ -58,17 +178,31 @@ function validateMethod(method) {
|
|
|
58
178
|
oauthEndpoint(auth.definition.authorization.url);
|
|
59
179
|
providerParameters(auth.definition.authorization.parameters);
|
|
60
180
|
}
|
|
181
|
+
const fields = Object.values(auth.definition.password?.fields ?? {});
|
|
182
|
+
for (const name of fields) {
|
|
183
|
+
identifier(name);
|
|
184
|
+
providerParameters({ [name]: "" });
|
|
185
|
+
}
|
|
186
|
+
if (new Set(fields).size !== fields.length)
|
|
187
|
+
throw new AuthError("invalid_definition");
|
|
61
188
|
for (const operation of [
|
|
62
189
|
"exchange",
|
|
63
190
|
"refresh",
|
|
64
191
|
"clientCredentials",
|
|
65
192
|
"jwtBearer",
|
|
193
|
+
"password",
|
|
66
194
|
]) {
|
|
67
195
|
const endpoint = auth.definition[operation];
|
|
68
196
|
if (!endpoint)
|
|
69
197
|
continue;
|
|
70
198
|
oauthEndpoint(endpoint.url);
|
|
71
199
|
providerParameters(endpoint.parameters);
|
|
200
|
+
providerHeaders(endpoint.headers);
|
|
201
|
+
if ((endpoint.refreshTokenBearer !== undefined &&
|
|
202
|
+
typeof endpoint.refreshTokenBearer !== "boolean") ||
|
|
203
|
+
(endpoint.refreshTokenBearer &&
|
|
204
|
+
["client_id_basic", "client_secret_basic"].includes(endpoint.clientAuthentication)))
|
|
205
|
+
throw new AuthError("invalid_definition");
|
|
72
206
|
if (![
|
|
73
207
|
"none",
|
|
74
208
|
"client_id",
|
|
@@ -81,25 +215,49 @@ function validateMethod(method) {
|
|
|
81
215
|
throw new AuthError("invalid_definition");
|
|
82
216
|
}
|
|
83
217
|
}
|
|
84
|
-
else if (auth.kind !== "
|
|
218
|
+
else if (auth.kind !== "none")
|
|
85
219
|
throw new AuthError("invalid_definition");
|
|
86
220
|
if (!Object.keys(method.targets).length)
|
|
87
221
|
throw new AuthError("invalid_definition");
|
|
88
222
|
for (const [name, target] of Object.entries(method.targets)) {
|
|
89
223
|
identifier(name);
|
|
224
|
+
const injected = injectedHeaders(auth, name);
|
|
90
225
|
targetBase(target);
|
|
91
226
|
if (!Array.isArray(target.methods) ||
|
|
92
227
|
!target.methods.length ||
|
|
93
228
|
target.methods.some((m) => !HTTP_METHODS.includes(m)))
|
|
94
229
|
throw new AuthError("invalid_definition");
|
|
95
|
-
if (target.allowedHeaders !== undefined &&
|
|
96
|
-
!Array.isArray(target.allowedHeaders))
|
|
230
|
+
if ((target.allowedHeaders !== undefined &&
|
|
231
|
+
!Array.isArray(target.allowedHeaders)) ||
|
|
232
|
+
(target.timeoutMs !== undefined &&
|
|
233
|
+
!bounded(target.timeoutMs, TARGET_TIMEOUT_LIMIT_MS)) ||
|
|
234
|
+
(target.maxResponseBytes !== undefined &&
|
|
235
|
+
!bounded(target.maxResponseBytes, TARGET_RESPONSE_LIMIT_BYTES)) ||
|
|
236
|
+
(target.encodedSlashes !== undefined &&
|
|
237
|
+
typeof target.encodedSlashes !== "boolean"))
|
|
97
238
|
throw new AuthError("invalid_definition");
|
|
98
|
-
for (const
|
|
99
|
-
const header = headerName(
|
|
100
|
-
if (header
|
|
239
|
+
for (const allowed of target.allowedHeaders ?? []) {
|
|
240
|
+
const header = headerName(allowed);
|
|
241
|
+
if (injected.includes(header) || TRANSPORT_HEADERS.includes(header))
|
|
101
242
|
throw new AuthError("invalid_definition");
|
|
102
243
|
}
|
|
244
|
+
// A socket URL carries only query parameters: no header, body or
|
|
245
|
+
// bearer can sign it, and nothing is sent through it by the transport.
|
|
246
|
+
if (target.socket !== undefined &&
|
|
247
|
+
(target.socket !== true ||
|
|
248
|
+
auth.kind === "oauth2" ||
|
|
249
|
+
target.allowedHeaders !== undefined ||
|
|
250
|
+
target.idempotency !== undefined ||
|
|
251
|
+
target.resumableUpload !== undefined ||
|
|
252
|
+
(auth.kind === "static" &&
|
|
253
|
+
placementsFor(auth, name).some((placement) => placement.in !== "query"))))
|
|
254
|
+
throw new AuthError("invalid_definition");
|
|
255
|
+
// A path part is inserted into the request URL alone; a Destination on
|
|
256
|
+
// the same target would name a resource outside the signed position.
|
|
257
|
+
if (auth.kind === "static" &&
|
|
258
|
+
(target.methods.includes("COPY") || target.methods.includes("MOVE")) &&
|
|
259
|
+
placementsFor(auth, name).some((placement) => placement.in === "path"))
|
|
260
|
+
throw new AuthError("invalid_definition");
|
|
103
261
|
if (target.resumableUpload !== undefined &&
|
|
104
262
|
(typeof target.resumableUpload !== "boolean" ||
|
|
105
263
|
!target.methods.includes("PUT") ||
|
|
@@ -107,8 +265,8 @@ function validateMethod(method) {
|
|
|
107
265
|
throw new AuthError("invalid_definition");
|
|
108
266
|
if (target.idempotency) {
|
|
109
267
|
const header = headerName(target.idempotency.header);
|
|
110
|
-
if (header
|
|
111
|
-
header
|
|
268
|
+
if (injected.includes(header) ||
|
|
269
|
+
TRANSPORT_HEADERS.includes(header) ||
|
|
112
270
|
!target.idempotency.methods.length ||
|
|
113
271
|
target.idempotency.methods.some((m) => !target.methods.includes(m) || m === "GET" || m === "HEAD"))
|
|
114
272
|
throw new AuthError("invalid_definition");
|
|
@@ -116,16 +274,15 @@ function validateMethod(method) {
|
|
|
116
274
|
}
|
|
117
275
|
if (method.probe) {
|
|
118
276
|
const probe = method.probe;
|
|
119
|
-
const target =
|
|
120
|
-
? method.targets[probe.target]
|
|
121
|
-
: undefined;
|
|
277
|
+
const target = targetOf(method, probe.target);
|
|
122
278
|
if (!target ||
|
|
279
|
+
target.socket ||
|
|
123
280
|
!["GET", "HEAD"].includes(probe.method) ||
|
|
124
281
|
!target.methods.includes(probe.method) ||
|
|
125
282
|
!probe.acceptedStatuses.length ||
|
|
126
283
|
probe.acceptedStatuses.some((status) => !Number.isInteger(status) || status < 200 || status > 299))
|
|
127
284
|
throw new AuthError("invalid_definition");
|
|
128
|
-
resourceUrl(target, probe.path);
|
|
285
|
+
refuseCredentialParams(resourceUrl(target, probe.path), injectedParams(auth, probe.target));
|
|
129
286
|
}
|
|
130
287
|
}
|
|
131
288
|
/** No implicit defaults, provider inference, executable expressions, or replacement. */
|
|
@@ -7,17 +7,58 @@ export interface AuthenticatedRequest {
|
|
|
7
7
|
headers?: Record<string, string>;
|
|
8
8
|
/** Buffered, copied before the first await. Streams and FormData are not accepted. */
|
|
9
9
|
body?: string | Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* COPY and MOVE only, and required there: where the resource goes, a
|
|
12
|
+
* path beneath the same target checked as `path` is, sent as the
|
|
13
|
+
* absolute Destination header. Callers never set that header.
|
|
14
|
+
*/
|
|
15
|
+
destination?: string;
|
|
10
16
|
/** Enables write replay only with a provider-declared idempotency contract. */
|
|
11
17
|
idempotencyKey?: string;
|
|
12
18
|
/** Disable even otherwise-safe replay for a particular request. */
|
|
13
19
|
retry?: "never";
|
|
14
20
|
}
|
|
21
|
+
/** A socket target, and the path and query beneath it to connect to. */
|
|
22
|
+
export interface SocketRequest {
|
|
23
|
+
target: string;
|
|
24
|
+
path: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Authenticated requests and probes for one connection, on behalf of one
|
|
28
|
+
* action call, signed by whoever holds its credentials. A host that keeps
|
|
29
|
+
* credentials outside the process running actions supplies one per call;
|
|
30
|
+
* the plugin never sees the token it is signed with.
|
|
31
|
+
*/
|
|
32
|
+
export interface CredentialBroker {
|
|
33
|
+
request(input: AuthenticatedRequest): Promise<Response>;
|
|
34
|
+
probe(): Promise<CredentialProbeResult>;
|
|
35
|
+
/**
|
|
36
|
+
* A URL the plugin may open for a socket target. The local signer
|
|
37
|
+
* returns the signed URL itself; a host keeping the credential returns
|
|
38
|
+
* a relay it controls. A broker without it serves no sockets.
|
|
39
|
+
*/
|
|
40
|
+
socketUrl?(input: SocketRequest): Promise<string>;
|
|
41
|
+
}
|
|
42
|
+
/** The action call a host builds a broker for. `context` is the per-run
|
|
43
|
+
* context the embedder passed to `execute()`: host authority, never
|
|
44
|
+
* action input. */
|
|
45
|
+
export interface CredentialBrokerCall {
|
|
46
|
+
plugin: string;
|
|
47
|
+
action: string;
|
|
48
|
+
context?: unknown;
|
|
49
|
+
}
|
|
15
50
|
export interface CredentialTransportOptions {
|
|
16
51
|
/** Mandatory trusted transport: enforce DNS/IP egress policy for token AND API requests. */
|
|
17
52
|
fetch: typeof globalThis.fetch;
|
|
53
|
+
/** Deadline for token requests and for targets that declare none. */
|
|
18
54
|
timeoutMs?: number;
|
|
55
|
+
/** Response ceiling for targets that declare none. */
|
|
19
56
|
maxResponseBytes?: number;
|
|
20
57
|
maxRequestBytes?: number;
|
|
58
|
+
/** The longest deadline a target may declare. */
|
|
59
|
+
maxTargetTimeoutMs?: number;
|
|
60
|
+
/** The largest response ceiling a target may declare. */
|
|
61
|
+
maxTargetResponseBytes?: number;
|
|
21
62
|
}
|
|
22
63
|
/**
|
|
23
64
|
* Trusted-host primitive, not a workspace sandbox. Callers authorize a binding on
|
|
@@ -29,10 +70,15 @@ export declare class CredentialTransport {
|
|
|
29
70
|
constructor(registry: CredentialRegistry, options: CredentialTransportOptions);
|
|
30
71
|
private read;
|
|
31
72
|
private renew;
|
|
73
|
+
/** New tokens by the method's declared renewal, from what the binding supplies. */
|
|
74
|
+
private issue;
|
|
32
75
|
request(selection: CredentialBinding, input: AuthenticatedRequest): Promise<Response>;
|
|
76
|
+
/**
|
|
77
|
+
* A socket target's URL, signed by its query placements, for a host's
|
|
78
|
+
* relay or the local signer to open. Nothing is sent.
|
|
79
|
+
*/
|
|
80
|
+
socketUrl(selection: CredentialBinding, input: SocketRequest): Promise<string>;
|
|
33
81
|
/** Only a declared read-only probe runs. Results never contain provider text or secrets. */
|
|
34
82
|
probe(binding: CredentialBinding): Promise<CredentialProbeResult>;
|
|
35
|
-
/** Trusted-host compatibility primitive. Never expose raw tokens through a broker. */
|
|
36
|
-
accessToken(selection: CredentialBinding): Promise<string>;
|
|
37
83
|
private authorize;
|
|
38
84
|
}
|