К основному содержанию
скилл CX Codex

integration-connectivity-connected-app-configure — скилл

Скилл для настройки OAuth в Salesforce: Connected Apps, External Client Apps, JWT bearer и PKCE. Пригодится, когда правите .connectedApp-meta.xml или .eca-meta.xml.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add forcedotcom/sf-skills --skill integration-connectivity-connected-app-configure -a claude-code
Открыть на GitHub

Что делает integration-connectivity-connected-app-configure

Скилл ведёт через выбор модели приложения и типа OAuth-потока. Сначала он помогает решить, что брать: Connected App для простой интеграции в одной организации или External Client App, если нужны упаковка, ротация секретов и более строгий контроль. Дальше подбирается поток: Authorization Code для бэкенда, Authorization Code с PKCE для SPA и мобильных, JWT Bearer для server-to-server, Device Flow для CLI, Client Credentials для сервисных приложений.

Генерация идёт не с нуля, а от шаблонов в assets/ — например, connected-app-jwt.xml или external-client-app.xml. Отдельно скилл читает references/security-checklist.md со 120-пунктным чек-листом и references/testing-validation-guide.md перед передачей работы. Секреты в исходники не попадают, scope по умолчанию не Full, для публичных клиентов обязателен PKCE.

Для работы нужны curl, jq, openssl, python3 и sf CLI версий из метаданных скилла, минимальная версия API — 57.0. Настройки безопасности ECA скилл советует сначала вытащить из организации командой sf project retrieve start --metadata ExtlClntAppOauthSecuritySettings:<AppName> --target-org <alias> и уже этот файл считать источником схемы. Если в организации отключено создание новых Connected Apps, для новых интеграций остаются External Client Apps.

Какие задачи решает

  • выбрать между Connected App и External Client App для новой интеграции
  • настроить JWT bearer для server-to-server без участия пользователя
  • добавить PKCE в OAuth-поток мобильного или SPA-клиента
  • разобрать ошибку INVALID_CROSS_REFERENCE_KEY при деплое ECA
  • проверить конфигурацию OAuth по чек-листу перед выкаткой

Примеры запросов агенту

  • Настрой OAuth для нового External Client App: нужен JWT bearer и минимальные scope
  • Проверь мой .connectedApp-meta.xml по чек-листу безопасности и скажи, что поправить
  • Собери .eca-meta.xml для сервисной интеграции, секреты не коммить

Как установить integration-connectivity-connected-app-configure

1Через Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill integration-connectivity-connected-app-configure -a claude-code

2Вручную: положить файлы

~/.claude/skills/integration-connectivity-connected-app-configure/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/integration-connectivity-connected-app-configure/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора167

platform-lightning-app-coordinate Создаёт развёртываемые приложения Salesforce Lightning Experience из текстового описания. Нужен, когда требуется связать несколько типов метаданных в одном приложении. CX Codex +1 5 600установок design-systems-slds2-migrate Прогоняет линтер SLDS по компонентам и помогает починить нарушения при переезде Lightning Web Components с SLDS 1 на SLDS 2. CX Codex +1 5 600установок external-diagram-mermaid-generate Строит диаграммы Mermaid по архитектуре Salesforce: потоки OAuth, ERD, интеграции, структуру Agentforce. Резервный вариант в ASCII, если рендерер недоступен. CX Codex +1 5 500установок integration-connectivity-generate Настраивает интеграции Salesforce: учётные данные, REST/SOAP-вызовы, External Services, Platform Events и CDC. Нужен при проектировании обмена с внешними системами. CX Codex +1 5 400установок experience-ui-bundle-frontend-generate Скилл для правок интерфейса в уже собранном UI-бандле Salesforce: страницы, компоненты, вёрстка, навигация, брендинг. CX Codex +1 5 300установок agentforce-d360-analyze Скилл восстанавливает сессии Agentforce из Data Cloud по UUID или идентификатору MessagingSession. Помогает разбирать ход диалогов, когда нужно найти причину сбоя или эскалации. CX Codex +1 5 300установок experience-ui-bundle-file-upload-generate Настраивает загрузку файлов в React-компонентах Salesforce UI bundle. Помогает связать файлы с ContentVersion и отслеживать прогресс передачи. CX Codex +1 5 200установок dx-app-analytics-query Скилл помогает получать данные об использовании управляемых пакетов через App Analytics и настраивать режим симуляции. Нужен для запросов к данным подписчиков. CX Codex +1 5 200установок

Похожие

oauth mcollina Настраивает авторизацию OAuth 2.0 и 2.1 в приложениях на Fastify с защитой через PKCE и ротацией токенов. Пригодится для проверки JWT, настройки сессий и устранения ошибок redirect URI. CX Codex +1 1 300установок oauth-oidc-misconfiguration yaklang Чек-лист для проверки настроек OAuth 2.0 и OpenID Connect. Помогает находить уязвимости в redirect_uri, валидации state, реализации PKCE и привязке аккаунтов. CX Codex +1 3 700установок integration-listing-optimization Samuel Berthe Оптимизирует карточки B2B SaaS в каталогах AppExchange, Shopify, Atlassian, HubSpot и Slack. Помогает поднять конверсию просмотров в установки и легально собирать отзывы. CX Codex +1 7 700установок mcp-integration официальный Anthropic Скилл помогает подключать MCP-серверы к плагинам Claude Code и настраивать доступ к их инструментам. Пригодится, если нужно связать плагин с API, базой данных или файловой системой. 6 994установок sap-btp-connectivity secondsky Помогает настроить Destination Service, Cloud Connector и прокси для гибридной связности в SAP BTP. Пригодится при отладке ошибок 405, 407 и 503 или подключении к on-premise системам. CX Codex +1 943установок salesforce-developer https://github.com/Jeffallan Пишет Apex-классы, собирает Lightning Web Components, оптимизирует SOQL-запросы и настраивает пакетную обработку на платформе Salesforce. Следит за governor limits и булкифицирует код. CX Codex +1 4 300установок

Рядом в теме «Бэкенд и API»

Всё по теме «Бэкенд и API» →

Вопросы о integration-connectivity-connected-app-configure

Как установить integration-connectivity-connected-app-configure в Claude?

Выполните npx skills add forcedotcom/sf-skills --skill integration-connectivity-connected-app-configure -a claude-code. После этого файл скилла появится по пути ~/.claude/skills/integration-connectivity-connected-app-configure/SKILL.md.

Что делает integration-connectivity-connected-app-configure?

Помогает настроить OAuth в Salesforce: выбирает между Connected App и External Client App, подбирает поток (auth code, PKCE, JWT bearer, device, client credentials) и собирает метаданные из готовых шаблонов.

Что нужно для работы скилла?

Утилиты curl, jq, openssl, python3 и sf CLI указанных в метаданных версий, а также API версии не ниже 57.0. Настройки безопасности ECA скилл советует сначала вытащить из организации.

Исходный текст

SKILL.md · Apache-2.0
---
name: integration-connectivity-connected-app-configure
description: "Salesforce Connected Apps and External Client Apps OAuth configuration with 120-point scoring. Use this skill to configure OAuth flows, JWT bearer auth, Connected Apps, and External Client Apps in Salesforce. TRIGGER when: user configures OAuth flows, JWT bearer auth, Connected Apps, ECAs, or touches .connectedApp-meta.xml / .eca-meta.xml files. DO NOT TRIGGER when: configuring Named Credentials for callouts (use integration-connectivity-generate), reviewing permission policies (use platform-metadata-deploy), or writing Apex token-handling code (use platform-apex-generate)."
allowed-tools: Bash Read Write Edit Glob Grep WebFetch AskUserQuestion TodoWrite
metadata:
  version: "1.1"
  domains: ["Integration"]
  minApiVersion: "57.0"
  relatedSkills:
    - "integration-connectivity-generate"
    - "platform-apex-generate"
    - "platform-metadata-deploy"
  cliTools:
    - tool: ["curl"]
      semver: ">=7.0.0"
    - tool: ["jq"]
      semver: ">=1.7.0"
    - tool: ["openssl"]
      semver: ">=1.1.0"
    - tool: ["python3"]
      semver: ">=3.10.0"
    - tool: ["sf"]
      semver: ">=2.0.0"
---

# integration-connectivity-connected-app-configure: Salesforce Connected Apps & External Client Apps

Use this skill when the user needs **OAuth app configuration** in Salesforce: Connected Apps, External Client Apps (ECAs), JWT bearer setup, PKCE decisions, scope design, or migration from older Connected App patterns to newer ECA patterns.

## Scope

**In scope:**
- `.connectedApp-meta.xml` or `.eca-meta.xml` files
- OAuth flow selection and callback / scope setup
- JWT bearer auth, device flow, client credentials, or auth-code decisions
- Connected App vs External Client App architecture choices
- Consumer key / secret / certificate handling strategy

**Out of scope — delegate elsewhere:**
- Configuring Named Credentials or runtime callouts → [integration-connectivity-generate](../integration-connectivity-generate/SKILL.md)
- Deploying metadata to orgs → the `platform-metadata-deploy` skill
- Writing Apex token-handling code → the `platform-apex-generate` skill

---

## First Decision: Connected App or External Client App

| If the need is... | Prefer |
|---|---|
| simple single-org OAuth app | Connected App |
| new development with better secret handling | External Client App |
| multi-org / packaging / stronger operational controls | External Client App |
| straightforward legacy compatibility | Connected App |

Default guidance:
- Choose **ECA** for new regulated, packageable, or automation-heavy solutions.
- Choose **Connected App** when simplicity and legacy compatibility matter more.
- Spring '26 note: creation of new Connected Apps is disabled by default in orgs. For new integrations, prefer External Client Apps unless Connected App compatibility is explicitly required.

---

## Required Inputs

Ask for or infer:
- App type: Connected App or ECA
- OAuth flow: auth code, PKCE, JWT bearer, device, client credentials
- Client type: confidential vs public
- Callback URLs / redirect surfaces
- Required scopes
- Distribution model: local org only vs packageable / multi-org
- Whether certificates or secret rotation are required

---

## Workflow

### 1. Choose the app model
Decide whether a Connected App or ECA is the better long-term fit using the decision table above.

### 2. Choose the OAuth flow

| Use case | Default flow |
|---|---|
| backend web app | Authorization Code |
| SPA / mobile / public client | Authorization Code + PKCE |
| server-to-server / CI/CD | JWT Bearer |
| device / CLI auth | Device Flow |
| service account style app | Client Credentials (typically ECA) |

### 3. Start from the right template
Read the appropriate template before generating — do not build from scratch:

| Template | Use case |
|---|---|
| `assets/connected-app-basic.xml` | Simple API integration, minimal OAuth |
| `assets/connected-app-oauth.xml` | Web app with full OAuth 2.0 configuration |
| `assets/connected-app-jwt.xml` | JWT bearer / server-to-server |
| `assets/connected-app-canvas.xml` | Embedding external apps in Salesforce UI (Canvas) |
| `assets/external-client-app.xml` | ECA header file — all new ECA builds start here |
| `assets/eca-global-oauth.xml` | ECA global OAuth settings (scopes, PKCE, rotation) |
| `assets/eca-oauth-settings.xml` | ECA per-app OAuth settings |
| `assets/eca-policies.xml` | ECA configurable policies |

If you need source-controlled ECA OAuth security metadata, retrieve it from an org first and treat the retrieved file as the schema source of truth:
```sh
sf project retrieve start --metadata ExtlClntAppOauthSecuritySettings:<AppName> --target-org <alias>
```

### 4. Apply security hardening
Read `references/security-checklist.md` for the full 120-point security checklist. Favor:
- Least-privilege scopes
- Explicit callback URLs
- PKCE for public clients
- Certificate-based auth where appropriate
- Rotation-ready secret / key handling
- IP restrictions when realistic and maintainable

### 5. Validate deployment readiness
Read `references/testing-validation-guide.md` before handoff. Confirm:
- Metadata file naming is correct (see Gotchas below)
- Scopes are justified
- Callback and auth model match the real client type
- Secrets are not embedded in source

### 6. Handle errors
If deployment fails, check the error output for:
- `DUPLICATE_VALUE` — a Connected App or ECA with this name already exists; rename or retrieve-then-update instead
- `INVALID_CROSS_REFERENCE_KEY` — the `externalClientApplication` name in an ECA settings file doesn't match the `.eca-meta.xml` filename exactly
- `INSUFFICIENT_ACCESS_OR_READONLY` — user lacks the "Manage Connected Apps" permission
- If any step fails, do not proceed to the next step — surface the error to the user with the specific message above

---

## Rules / Constraints

| Rule | Rationale |
|---|---|
| Never commit consumer secrets to source control | Credential exposure risk |
| Never use `Full` scope by default | Unnecessary privilege; request only what the app needs |
| Always use PKCE for public clients (mobile, SPA) | Prevents auth code interception |
| Never use wildcard or overly broad callback URLs | Token interception risk |
| ECA OAuth security settings must be retrieved from org before editing | File schema is not fully documented; retrieve-first ensures accuracy |
| Use `<alias>` placeholders in CLI commands, never hardcoded org URLs | Org URLs vary per environment |
| Detect actual `packageDirectory` from `sfdx-project.json` before writing files | Projects may not use the default `force-app/main/default/` layout |

---

## Metadata Notes That Matter

### Connected App
Default source location (verify via `sfdx-project.json → packageDirectories`):
- `<packageDir>/connectedApps/`

### External Client App
ECA metadata spans multiple top-level source directories. Default locations (verify via `sfdx-project.json`):

| Directory | Metadata type | File suffix |
|---|---|---|
| `<packageDir>/externalClientApps/` | `ExternalClientApplication` | `.eca-meta.xml` |
| `<packageDir>/extlClntAppGlobalOauthSets/` | `ExtlClntAppGlobalOauthSettings` | `.ecaGlblOauth-meta.xml` |
| `<packageDir>/extlClntAppOauthSettings/` | `ExtlClntAppOauthSettings` | `.ecaOauth-meta.xml` |
| `<packageDir>/extlClntAppOauthSecuritySettings/` | `ExtlClntAppOauthSecuritySettings` | `.ecaOauthSecurity-meta.xml` |
| `<packageDir>/extlClntAppOauthPolicies/` | `ExtlClntAppOauthConfigurablePolicies` | `.ecaOauthPlcy-meta.xml` |
| `<packageDir>/extlClntAppPolicies/` | `ExtlClntAppConfigurablePolicies` | `.ecaPlcy-meta.xml` |

---

## Gotchas

| Gotcha | Detail |
|---|---|
| `.ecaGlblOauth` not `.ecaGlobalOauth` | The global OAuth suffix is abbreviated — using the long form will break deployment |
| `.ecaPlcy` not `.ecaPolicy` | Same abbreviation pattern — the general policy suffix is short form |
| `.ecaOauthSecurity` for security settings | Use `.ecaOauthSecurity`, not `.ecaSecurity` |
| ECA OAuth security settings are retrieve-only | Cannot be created from scratch in source — always retrieve from org first |
| Spring '26: new Connected Apps disabled by default | New orgs block Connected App creation; use ECA unless explicitly required |
| Consumer key is generated post-deploy | You cannot set the consumer key in metadata — retrieve it after first deployment |

---

## Output Expectations

When finishing, confirm and report in this order:

1. **App type chosen** — Connected App or External Client App
2. **OAuth flow chosen**
3. **Files created or updated** — list each metadata file path
4. **Security decisions** — scopes, PKCE, certs, secrets, IP policy
5. **Next deployment / testing step**

Suggested output shape:
```text
App: <name>
Type: Connected App | External Client App
Flow: <oauth flow>
Files: <paths>
Security: <scopes, PKCE, certs, secrets, IP policy>
Next step: <deploy, retrieve consumer key, or test auth flow>
Score: <x>/120
```

---

## Cross-Skill Integration

| Need | Delegate to | Reason |
|---|---|---|
| Named Credential / callout runtime config | [integration-connectivity-generate](../integration-connectivity-generate/SKILL.md) | runtime integration setup |
| Deploy app metadata | `platform-metadata-deploy` skill | org validation and deployment |
| Apex token or refresh handling | `platform-apex-generate` skill | implementation logic |

---

## Score Guide

| Score | Meaning |
|---|---|
| 80+ | production-ready OAuth app config |
| 54–79 | workable but needs hardening review |
| < 54 | block deployment until fixed |

---

## Reference File Index

| File | When to read |
|---|---|
| `assets/connected-app-basic.xml` | Step 3 — template for simple Connected App with minimal OAuth |
| `assets/connected-app-oauth.xml` | Step 3 — template for full OAuth 2.0 Connected App |
| `assets/connected-app-jwt.xml` | Step 3 — template for JWT bearer / server-to-server Connected App |
| `assets/connected-app-canvas.xml` | Step 3 — template for Canvas app embedding in Salesforce UI |
| `assets/external-client-app.xml` | Step 3 — ECA header file template |
| `assets/eca-global-oauth.xml` | Step 3 — ECA global OAuth settings template (PKCE, rotation, callbacks) |
| `assets/eca-oauth-settings.xml` | Step 3 — ECA per-app OAuth settings template |
| `assets/eca-policies.xml` | Step 3 — ECA configurable policies template |
| `references/oauth-flows-reference.md` | Step 2 — detailed OAuth flow comparison and decision guide |
| `references/security-checklist.md` | Step 4 — full 120-point security scoring checklist |
| `references/testing-validation-guide.md` | Step 5 — pre-deployment validation and testing guide |
| `references/migration-guide.md` | When migrating from Connected App to ECA patterns |
| `references/example-usage.md` | Full end-to-end examples for common OAuth scenarios |

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой