aws-sigv4 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sigv4/asymmetric_credentials.rb +11 -3
- data/lib/aws-sigv4/request.rb +3 -3
- data/lib/aws-sigv4/signer.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc29b65cc675de5b6f636497edd82f69292ea54f4b850f21583cc96535afca06
|
4
|
+
data.tar.gz: 21be8ec44bf2a733afdd03a72254c08463bc32fc7f85d3a22af42871a353ff0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e360d1a9f0887f3717dd9f5ac5c523033b032f6e04870efab27c00d1d219921a9dd1ff30569ed2296ba122222c4c9913aa35a160d5bf3ba821b31c7d88a02446
|
7
|
+
data.tar.gz: 4c302c160726869e1c8d255137afcc65de10fa527436b86fce91e1e874735ffa67767505dfccc7aebdc56898958effbf28c05f853f287cc4ea7385076667af5c
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.11.0 (2025-01-10)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Add RBS signature files to support static type checking
|
8
|
+
|
9
|
+
1.10.1 (2024-10-21)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Issue - Fix sigv4a signing issue with derive_asymmetric_key for certain credentials.
|
13
|
+
|
4
14
|
1.10.0 (2024-09-17)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.11.0
|
@@ -11,8 +11,6 @@ module Aws
|
|
11
11
|
|
12
12
|
N_MINUS_2 = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 - 2
|
13
13
|
|
14
|
-
# @param [String] :access_key_id
|
15
|
-
# @param [String] :secret_access_key
|
16
14
|
# @return [OpenSSL::PKey::EC, Hash]
|
17
15
|
def self.derive_asymmetric_key(access_key_id, secret_access_key)
|
18
16
|
check_openssl_support!
|
@@ -60,6 +58,16 @@ module Aws
|
|
60
58
|
x
|
61
59
|
end
|
62
60
|
|
61
|
+
# @return [Array] value of the BigNumber as a big-endian unsigned byte array.
|
62
|
+
def self.bn_to_be_bytes(bn)
|
63
|
+
bytes = []
|
64
|
+
while bn > 0
|
65
|
+
bytes << (bn & 0xff)
|
66
|
+
bn = bn >> 8
|
67
|
+
end
|
68
|
+
bytes.reverse
|
69
|
+
end
|
70
|
+
|
63
71
|
# Prior to openssl3 we could directly set public and private key on EC
|
64
72
|
# However, openssl3 deprecated those methods and we must now construct
|
65
73
|
# a der with the keys and load the EC from it.
|
@@ -67,7 +75,7 @@ module Aws
|
|
67
75
|
# format reversed from: OpenSSL::ASN1.decode_all(OpenSSL::PKey::EC.new.to_der)
|
68
76
|
asn1 = OpenSSL::ASN1::Sequence([
|
69
77
|
OpenSSL::ASN1::Integer(OpenSSL::BN.new(1)),
|
70
|
-
OpenSSL::ASN1::OctetString(
|
78
|
+
OpenSSL::ASN1::OctetString(bn_to_be_bytes(d).pack('C*')),
|
71
79
|
OpenSSL::ASN1::ASN1Data.new([OpenSSL::ASN1::ObjectId("prime256v1")], 0, :CONTEXT_SPECIFIC),
|
72
80
|
OpenSSL::ASN1::ASN1Data.new(
|
73
81
|
[OpenSSL::ASN1::BitString(public_key.to_octet_string(:uncompressed))],
|
data/lib/aws-sigv4/request.rb
CHANGED
@@ -7,7 +7,7 @@ module Aws
|
|
7
7
|
class Request
|
8
8
|
|
9
9
|
# @option options [required, String] :http_method
|
10
|
-
# @option options [required,
|
10
|
+
# @option options [required, String, URI::HTTP, URI::HTTPS] :endpoint
|
11
11
|
# @option options [Hash<String,String>] :headers ({})
|
12
12
|
# @option options [String, IO] :body ('')
|
13
13
|
def initialize(options = {})
|
@@ -30,12 +30,12 @@ module Aws
|
|
30
30
|
@http_method
|
31
31
|
end
|
32
32
|
|
33
|
-
# @param [String, HTTP
|
33
|
+
# @param [String, URI::HTTP, URI::HTTPS] endpoint
|
34
34
|
def endpoint=(endpoint)
|
35
35
|
@endpoint = URI.parse(endpoint.to_s)
|
36
36
|
end
|
37
37
|
|
38
|
-
# @return [HTTP
|
38
|
+
# @return [URI::HTTP, URI::HTTPS]
|
39
39
|
def endpoint
|
40
40
|
@endpoint
|
41
41
|
end
|
data/lib/aws-sigv4/signer.rb
CHANGED
@@ -205,7 +205,7 @@ module Aws
|
|
205
205
|
# @option request [required, String] :http_method One of
|
206
206
|
# 'GET', 'HEAD', 'PUT', 'POST', 'PATCH', or 'DELETE'
|
207
207
|
#
|
208
|
-
# @option request [required, String, URI::
|
208
|
+
# @option request [required, String, URI::HTTP, URI::HTTPS] :url
|
209
209
|
# The request URI. Must be a valid HTTP or HTTPS URI.
|
210
210
|
#
|
211
211
|
# @option request [optional, Hash] :headers ({}) A hash of headers
|
@@ -383,7 +383,7 @@ module Aws
|
|
383
383
|
# @option options [required, String] :http_method The HTTP request method,
|
384
384
|
# e.g. 'GET', 'HEAD', 'PUT', 'POST', 'PATCH', or 'DELETE'.
|
385
385
|
#
|
386
|
-
# @option options [required, String,
|
386
|
+
# @option options [required, String, URI::HTTP, URI::HTTPS] :url
|
387
387
|
# The URI to sign.
|
388
388
|
#
|
389
389
|
# @option options [Hash] :headers ({}) Headers that should
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sigv4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-eventstream
|