Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GovCloud assume role and upgrade AWS SDK #99

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1
2.2.2
6 changes: 5 additions & 1 deletion lib/logstash/inputs/kinesis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ def register
end

# If a role ARN is set then assume the role as a new layer over the credentials already created
# In GovCloud we need to manually configure the STS endpoint
unless @role_arn.nil?
kinesis_creds = com.amazonaws.auth::STSAssumeRoleSessionCredentialsProvider.new(creds, @role_arn, @role_session_name)
sts = com.amazonaws.services.securitytoken::AWSSecurityTokenServiceClient.new(creds)
sts.setEndpoint("sts.us-gov-west-1.amazonaws.com") if @region.start_with?("us-gov")
builder = com.amazonaws.auth::STSAssumeRoleSessionCredentialsProvider::Builder.new(@role_arn, @role_session_name).withStsClient(sts)
kinesis_creds = builder.build()
else
kinesis_creds = creds
end
Expand Down
4 changes: 2 additions & 2 deletions logstash-input-kinesis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
spec.platform = 'java'

spec.requirements << "jar 'com.amazonaws:amazon-kinesis-client', '1.13.3'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-core', '1.11.1034'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-sts', '1.11.1034'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-core', '1.12.428'"
spec.requirements << "jar 'com.amazonaws:aws-java-sdk-sts', '1.12.428'"

spec.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"

Expand Down