【发布时间】:2017-08-23 19:51:12
【问题描述】:
我正在尝试通过调用 OpenWhisk 操作在 API Connect 中创建 POST API 方法。我使用 James Thomas 的文章 Serverless APIs with OpenWhisk and API Connect 中的 GET 方法作为连接和配置设置的模板,以将 OpenWhisk 操作集成到 API 中。我正在使用的 OpenWhisk 操作已成功将输入数据发布到 Compose PostgreSQL 数据库,因此我需要做的就是正确调用它并通过 API Connect 将输入数据以正确的格式发送到 OpenWhisk 函数。 我当前在 IBM API Developer Console 上的请求和响应输出是:
Request
POST https://api.us.apiconnect.ibmcloud.com/spatvis-tutorial/sb/post-trial/student Headers:
Content-Type: application/json
Accept: application/json
X-IBM-Client-Id: ********************************
X-IBM-Client-Secret: *******************************
Response
Code: 401 Unauthorized Headers:
x-global-transaction-id: 114129529
content-type: application/json
{}
OpenWhisk 函数没有被调用,我不知道为什么会出现安全错误。我需要什么样的凭据以及如何设置?使用Three approaches to securing access to Bluemix applications with IBM API Connect 文章中概述的 TLS、基本和自定义 HTTP 安全技术是否有意义?如果是这样,每种技术/方法的优缺点是什么?哪一种最适合用于保护对 OpenWhisk 操作的访问?
【问题讨论】:
标签: security authorization ibm-cloud apiconnect openwhisk