-
Notifications
You must be signed in to change notification settings - Fork 61
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
AWS IAM authentication #178
Open
andsel
wants to merge
4
commits into
logstash-plugins:main
Choose a base branch
from
andsel:aws_iam_authentication
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5d31f1f
Added dependency on AWS IAM jars and updated documentation
andsel 6f1b45c
Forcibly added all transient dependencies of aws-msk-iam-auth library
andsel bef696e
Bumped 11.5.2 version and updated Changelog to expose the settings to…
andsel 4c37ca9
Updated AWS IAM MKS library to the latest
andsel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😳
This seems like... a lot. Are we concerned that we are going to have issues with dependency clashes with other plugins and Logstash core?
cc @jsvd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 4c37ca9 you can see the difference switching from
1.1.4
to2.2.0
. While there is a consistent part of AWS libraries (part of groupssoftware.amazon.awssdk
andcom.amazonaws
) with this new version it adds:commons-codec:commons-codec
commons-logging:commons-logging
io.netty:netty-*
org.reactivestreams:reactive-streams
org.apache.httpcomponents
httpclient
andhttpcore
While Netty http and http2 codecs are present it was added also a dependency on Apache's
httpclient
so seems redundant.The risky one is Netty, because used in other Logstash plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Logstash core we have:
httpcore-4.4.16.jar
vs this4.4.13
(no apparent conflict)httpclient-4.5.14.jar
vs this4.5.13
(no apparent conflict)commons-codec-1.17.0.jar
vs this1.15
API should be compatiblecommons-logging-1.3.1.jar
vs this1.2
API should be compatible4.1.109
vs this4.1.108
so not so far and shouldn't breakThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pluggable security classes root in 2 classes:
software.amazon.msk.auth.iam.IAMLoginModule
software.amazon.msk.auth.iam.IAMClientCallbackHandler
The
IAMClientCallbackHandler
explicitly instantiatesMSKCredentialProvider
at: https://github.com/aws/aws-msk-iam-auth/blob/v2.2.0/src/main/java/software/amazon/msk/auth/iam/IAMClientCallbackHandler.java#L54The
MSKCredentialProvider
has direct dependency on 3 main AWSSDK packages:software.amazon.awssdk.auth
provided bysoftware.amazon.awssdk:auth
software.amazon.awssdk.core
provided bysoftware.amazon.awssdk:sdk-core
software.amazon.awssdk.services.sts
provide bysoftware.amazon.awssdk:sts
Looking at the source of
aws-msk-iam-auth
the artifactsoftware.amazon.awssdk:sdk-core
requires the following dependency tree:software.amazon.awssdk:sts
has direct dependency onsoftware.amazon.awssdk:apache-client
andsoftware.amazon.awssdk:netty-nio-client
which kicks in all thenetty
related dependencies.Despite the class
MSKCredentialProvider
doesn't directly refer to classes contained insoftware.amazon.awssdk:sso
andsoftware.amazon.awssdk:ssooidc
, removing those doesn't provide any gain in terms of numerosity of dependencies.So my conclusion is that we can't strip any jar.