summaryrefslogtreecommitdiff
path: root/lib/rubygems/s3_uri_signer.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/s3_uri_signer.rb6
1 files changed, 6 insertions, 0 deletions
@@ -6,7 +6,9 @@ require 'rubygems/openssl'
# S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems
# More on AWS SigV4: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
class Gem::S3URISigner
class ConfigurationError < Gem::Exception
def initialize(message)
super message
end
@@ -14,9 +16,11 @@ class Gem::S3URISigner
def to_s # :nodoc:
"#{super}"
end
end
class InstanceProfileError < Gem::Exception
def initialize(message)
super message
end
@@ -24,6 +28,7 @@ class Gem::S3URISigner
def to_s # :nodoc:
"#{super}"
end
end
attr_accessor :uri
@@ -174,4 +179,5 @@ class Gem::S3URISigner
BASE64_URI_TRANSLATE = { "+" => "%2B", "/" => "%2F", "=" => "%3D", "\n" => "" }.freeze
EC2_IAM_INFO = "http://169.254.169.254/latest/meta-data/iam/info".freeze
EC2_IAM_SECURITY_CREDENTIALS = "http://169.254.169.254/latest/meta-data/iam/security-credentials/".freeze
end