mcpField
S
sap-btp-connectivity

sap-btp-connectivity

github.com/secondsky云与 DevOps480956 次安装3 周前更新
代码仓库

关于 sap-btp-connectivity

sap-btp-connectivity 是面向 SAP BTP 开发者的技能,涵盖应用连接云端、本地及 VPC 服务的配置与排障。内容包括 Destination、Cloud Connector、身份传播和 Kubernetes/Kyma 连接方案。

主要功能

  1. 01配置 Destination 与认证
  2. 02设置 Cloud Connector 及访问控制
  3. 03配置 Kubernetes/Kyma 连接代理
  4. 04排查连接错误与代理问题
  5. 05查阅协议配置和安全指南

适用场景

  1. 01为 BTP 应用连接云端或本地 API
  2. 02配置 OAuth、主体验证或 RFC 连接
  3. 03让 Kubernetes 工作负载访问本地系统

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/secondsky/sap-skills --skill sap-btp-connectivity

安装后在 Claude Code 中输入/sap-btp-connectivity确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

README.md
agents/
openai.yaml
references/
advanced-configuration.md
authentication-types.md
cloud-connector.md
connectivity-alternatives-and-config.md
destination-service-api.md
http-destinations.md
identity-propagation-scenarios.md
java-sdk-development.md
kubernetes-connectivity.md
mail-protocols.md
mail-tcp-ldap-destinations.md
operational-guides.md
rfc-destinations.md
troubleshooting.md
templates/
connectivity-proxy-values.yaml
destination-http-oauth.json
destination-onpremise.json
transparent-proxy-values.yaml

详细介绍

SAP BTP Connectivity 技能

相关技能

  • sap-btp-cloud-platform:用于平台基础知识、BTP 账户设置和集成模式
  • sap-btp-best-practices:用于实现指南、安全最佳实践和生产部署
  • sap-cap-capire:用于 CAP 服务连接、目标使用和安全 API 访问
  • sap-fiori-tools:用于配置 Fiori 应用目标和前端连接
  • sap-abap:用于通过 RFC 连接 ABAP 系统或实现主体传播

何时使用此技能

在配置 BTP 目标、Cloud Connector、OAuth 流程、主体传播、RFC/LDAP/MAIL/TCP 连接、Kubernetes/Kyma 连接代理、多租户目标访问,或排查 405、407、503 和代理故障等连接错误时,请使用此技能。

目录

  1. 概览
  2. 快速开始
  3. 连接场景
  4. 目标类型
  5. 身份验证配置
  6. Cloud Connector 设置
  7. Kubernetes/Kyma 连接
  8. 常见问题与故障排查
  9. 安全最佳实践
  10. 关键规则
  11. 捆绑资源

概览

SAP BTP Connectivity 可让 SAP BTP 应用安全地访问云端、本地和 VPC 环境中的远程服务。

核心组件
组件用途
Destination Service管理连接元数据、身份验证和路由
Connectivity Service通过 Cloud Connector 为 Kubernetes 工作负载提供连接
Cloud Connector用于安全本地隧道的反向代理
Connectivity Proxy用于访问本地系统的 Kubernetes 组件
Transparent Proxy用于统一访问目标的 Kubernetes 组件

支持的环境:Cloud Foundry、ABAP Environment、Kyma
支持的协议:HTTP/HTTPS、RFC、TCP (SOCKS5)、LDAP/LDAPS、Mail


快速开始

创建 HTTP 目标(Cloud Foundry)
  1. 导航至 BTP Cockpit 中的 Connectivity > Destinations
  2. 选择:Create > From Scratch
  3. 配置:
    Name: my-destination
    Type: HTTP
    URL: https://api.example.com
    ProxyType: Internet
    Authentication: OAuth2ClientCredentials
    clientId: <your-client-id>
    clientSecret: <your-client-secret>
    tokenServiceURL: https://auth.example.com/oauth/token
    
设置 Cloud Connector
  1. 从 SAP Tools 下载
  2. 访问:https://localhost:8443
  3. 登录:Administrator / manage(立即更改)
  4. 添加子账户连接
在应用中访问目标(Node.js)
const { getDestination } = require('@sap-cloud-sdk/connectivity');
const destination = await getDestination({ destinationName: 'my-destination' });

连接场景

云到云
ProxyType: Internet
Authentication: OAuth2ClientCredentials | OAuth2SAMLBearerAssertion
云到本地
ProxyType: OnPremise
Authentication: BasicAuthentication | PrincipalPropagation

需要在本地网络中安装 Cloud Connector。

本地到云(服务通道)

供本地系统通过 Cloud Connector 访问 SAP BTP 服务。


目标类型

类型用例ProxyType常见身份验证方式
HTTPREST/OData APIInternet/OnPremiseOAuth2、Basic、证书
RFCSAP 系统OnPremiseBasic、PrincipalPropagation
LDAP目录服务InternetBasic、NoAuth
MAIL电子邮件协议InternetBasic、NoAuth
TCP通用 TCPOnPremiseBasic

详细配置:参见 references/http-destinations.md、references/rfc-destinations.md、references/mail-tcp-ldap-destinations.md


身份验证配置

OAuth2ClientCredentials(服务到服务)
Authentication: OAuth2ClientCredentials
clientId: <client-id>
clientSecret: <client-secret>
tokenServiceURL: https://auth.example.com/oauth/token
OAuth2SAMLBearerAssertion(用户传播)
Authentication: OAuth2SAMLBearerAssertion
audience: <target-audience>
clientKey: <client-key>
tokenServiceURL: https://auth.example.com/oauth2/token
KeyStoreLocation: <certificate-location>
PrincipalPropagation(本地单点登录)
Authentication: PrincipalPropagation
ProxyType: OnPremise

需要 Cloud Connector X.509 证书生成。

完整参考:references/authentication-types.md(全部 17 种以上类型)


Cloud Connector 设置

安装
  • 生产环境:Windows MSI/Linux RPM 软件包(服务注册)
  • 开发环境:便携式归档文件(手动执行)
初始配置
  1. 访问 UI:https://<hostname>:8443
  2. 登录:Administrator / manage
  3. 立即更改密码
  4. 选择模式:Master 或 Shadow
  5. 添加子账户连接
访问控制

配置本地资源访问:

  • 后端类型:ABAP 系统、SAP Gateway、非 SAP 系统、SAP HANA
  • HTTP 访问控制:系统映射 + 资源路径 + 策略
高可用性
  • Master-Shadow:主实例 + 备份实例,并同步配置
  • 要求:稳定的网络、不同的机器、相同的版本

完整指南:references/cloud-connector.md


Kubernetes/Kyma 连接

Connectivity Proxy

使 Kubernetes 工作负载能够访问本地系统。

安装:

helm install connectivity-proxy \
  oci://registry-1.docker.io/sapse/connectivity-proxy \
  --version <version> --namespace <namespace> -f values.yaml
Transparent Proxy

将 BTP 目标公开为 Kubernetes 服务。

安装:

helm install transparent-proxy \
  oci://registry-1.docker.io/sapse/transparent-proxy \
  --version <version> --namespace <namespace> -f values.yaml

用法:创建 Destination Custom Resource,并将其作为 Kubernetes 服务访问。

完整配置:references/kubernetes-connectivity.md


常见问题与故障排除

HTTP 错误代码
代码原因解决方案
400请求格式错误检查请求语法
401身份验证失败验证凭据/令牌
405使用了 HTTPS 而非 HTTP使用 http:// 和端口 20003
407缺少授权信息添加 Proxy-Authorization: Bearer <token>
503Cloud Connector 离线检查 CC 连接和 Location ID
Cloud Connector 问题

无法连接到子账户:

  • 验证区域主机 URL
  • 检查防火墙是否允许出站 HTTPS
  • 验证子账户凭据

访问资源被拒绝:

  • 检查访问控制配置
  • 验证虚拟主机映射
  • 检查资源路径策略

完整故障排除指南:references/troubleshooting.md


安全最佳实践

Cloud Connector
  • 在 IT 部门控制下部署于 DMZ
  • 立即更改默认密码
  • 配置 LDAP 以管理用户
  • 启用审计日志记录(生产环境使用 All 级别)
  • 部署高可用性架构(master + shadow)
Destinations
  • 使用 OAuth,而非基本身份验证
  • 将凭据存储在 Destination Service 中,而非代码中
  • 为所有连接启用 TLS
  • 使用 mTLS 增强安全性

关键规则

务必执行
  • 立即更改 Cloud Connector 默认密码
  • 对所有外部连接使用 HTTPS
  • 在公开资源前配置访问控制
  • 在生产环境中启用审计日志记录
  • 适当缓存令牌和目标
切勿执行
  • 将 Cloud Connector UI 暴露到互联网
  • 在应用程序代码中存储凭据
  • 跳过访问控制配置
  • 修改 Cloud Connector Tomcat 配置文件
  • 运行多个 master 实例(脑裂)

随附资源

配置参考
  • references/http-destinations.md - 完整的 HTTP 目标属性
  • references/rfc-destinations.md - RFC 目标属性和连接池
  • references/mail-tcp-ldap-destinations.md - Mail、TCP、LDAP 配置
  • references/authentication-types.md - 全部 17 种以上的身份验证配置
设置与配置
  • references/cloud-connector.md - Cloud Connector 设置与配置
  • references/kubernetes-connectivity.md - Connectivity Proxy 和 Transparent Proxy
  • references/destination-service-api.md - REST API 参考
高级主题
  • references/advanced-configuration.md - MTA、config.json、链接、ZTIS
  • references/identity-propagation-scenarios.md - ABAP、NetWeaver Java、自定义 IDP
  • references/operational-guides.md - 网络区域、解决方案管理
  • references/connectivity-alternatives-and-config.md - 反向代理、用户角色、RFC 配置
开发与 SDK
  • references/java-sdk-development.md - Java API、JCo、SAP Cloud SDK
  • references/mail-protocols.md - SMTP、IMAP、POP3 配置
模板
  • templates/destination-http-oauth.json - 带 OAuth 的 HTTP destination 模板
  • templates/destination-onpremise.json - 本地部署 destination 模板
  • templates/connectivity-proxy-values.yaml - Connectivity Proxy 的 Helm values
  • templates/transparent-proxy-values.yaml - Transparent Proxy 的 Helm values

文档链接


最后更新:2025-11-27
下次审查:2026-02-27
来源:https://github.com/SAP-docs/btp-connectivity(383 个文件,已分析 352 个以上)

评论

支持 Markdown