我们有两种类型的 API 端点;公立和私立。我是否可以仅在私有端点上使用 HMAC?
e.g.
GET https://api.example.com/items ... This is public API. No need HMAC.
POST https://api.example.com/users/john/friends ... This is private API. It needs HMAC. We want to confirm that John send this request by checking HMAC signature.
以下是 hmac-auth 插件的安装。似乎没有公私之分。
curl -i -X POST \
--url http://localhost:8001/apis/api.example.com/plugins/ \
--data "name=hmac-auth"