是否有可以使用AWS V4签名对请求进行签名的.NET库? [英] Is there a .NET library that can sign a request with AWS V4 Signature?

查看:244
本文介绍了是否有可以使用AWS V4签名对请求进行签名的.NET库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个API网关,用于在其中设置身份验证以使用AWS_IAM。这要求我使用AWS V4签名对每个请求进行签名,并将HMAC附加到标头中。我发现库可以在nodejs中使用V4签名对请求进行签名。但是我找不到图书馆为我签名。甚至.NET的aws-sdk都针对他们自己的特定用例进行了抽象。是否有图书馆(我在Google上进行了快速搜索但未找到结果)?还是我需要自己写出hmac?

I have an API Gateway where I'm setting the authentication to use AWS_IAM. This requires that I sign each request with the AWS V4 signature and attach the HMAC in the header. I've found libraries to sign a request with the V4 signature in nodejs. But I cannot find a library to sign for me. Even the aws-sdk for .NET has this abstracted for their own specific use case. Is there a library out there (i've done a quick google search and found no results)? Or do I need to write out the hmac myself?

推荐答案

您可以阅读签名的完成方式,并且可以(如果你要)。
我建议您引入适用于.NET的AWS开发工具包,并使用SDK中的功能实际执行签名。

you can read on how the signature is done and you can (if you want). I would recommend pulling in the AWS SDK for .NET and using the functionality from the SDK to actually perform the signature.

这里是SDK的签名者:

Here is the signer form the SDK:

https://github.com/aws/aws-sdk-net/blob/6c3be79bdafd5bfff1ab0bf5fec17abc66c7b516/sdk/src/Core/Amazon.Runtime/Internal/Auth/AWS4Signer .cs

您可能需要对其进行调整(即默认情况下它了解AWS服务和终端节点)

You may need to adapt it (ie it knows about AWS services and endpoints by default)

这篇关于是否有可以使用AWS V4签名对请求进行签名的.NET库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆