gpt4 book ai didi

ruby-on-rails - 录像机盒式 rails

转载 作者:行者123 更新时间:2023-11-28 21:36:09 25 4
gpt4 key购买 nike

我的产品 key 使用 aws kms 加密。

我可以用我的 aws 凭据创建一个盒式磁带,然后对其他凭据使用相同的答案吗?

为了加密 key ,我向 kms 发送了一个 plaintextciphertextblob 作为响应。相反,对于解密,我发送 ciphertextblob

我需要一个特定的答案与 secrets.yml 中的其他凭据一起提供。使用给定的 plaintextciphertextblob

这可能吗?

我的加密盒:

---
http_interactions:
- request:
method: post
uri: https://kms.us-east-1.amazonaws.com/
body:
encoding: UTF-8
string: '{"KeyId":"c503e...","Plaintext":"c29tZV9zZWNyZXRfa2V5"}'
headers:
Content-Type:
- application/x-amz-json-1.1
Accept-Encoding:
- ''
User-Agent:
- aws-sdk-ruby2/2.11.350 ruby/2.6.5 x86_64-darwin16
X-Amz-Target:
- TrentService.Encrypt
X-Amz-Date:
- 20191027T114350Z
Host:
- kms.us-east-1.amazonaws.com
X-Amz-Content-Sha256:
- e44f3b42ea47f0da15d3ea308f0fe18f...
Authorization:
- AWS4-HMAC-SHA256 Credential=AKIA.../20191027/us-east-1/kms/aws4_request,
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
Signature=6734f877ffaab94...
Content-Length:
- '83'
Accept:
- "*/*"
response:
status:
code: 200
message: OK
headers:
X-Amzn-Requestid:
- ab60...
Cache-Control:
- no-cache, no-store, must-revalidate, private
Expires:
- '0'
Pragma:
- no-cache
Date:
- Sun, 27 Oct 2019 11:43:50 GMT
Content-Type:
- application/x-amz-json-1.1
Content-Length:
- '331'
body:
encoding: UTF-8
string: '{"CiphertextBlob":"AQICAHhJfqHORt4q1tArVIjeOnn8HhbsQrVfjk1RwvzFcQ0PBwEQePP62gO7cgVCj1QBPiVEAAAAbTBrBgkqhkiG9w0BBwagXjBcAgEAMFcGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMtE/2tUMFssj2rYo+AgEQgCpF8oeItgXSUf/Xm17vEdTjScA7s+u21tLCPYb/WrTf+OZnZCp/wzgA7k8=","KeyId":"arn:aws:kms:us-east-1:9300...:key/c503..."}'
http_version:
recorded_at: Sun, 27 Oct 2019 11:43:50 GMT
recorded_with: VCR 5.0.0

最佳答案

是的,你可以filter sensitive data在录像机中。通过类似 dotenv 的方式将每个环境的凭据存储在 ENV 中,并过滤掉 ENV 值。例如

VCR.configure do |c|
c.filter_sensitive_data('<<AWS_CREDENTIALS>>') { ENV['AWS_CREDENTIALS'] }
end

关于ruby-on-rails - 录像机盒式 rails ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58579107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com