-
Notifications
You must be signed in to change notification settings - Fork 14
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 SDK v2 support #64
Conversation
…bership-url-oauth-support
client = clientBuilder.build(); | ||
awsSecurityTokenService = stsBuilder.build(); | ||
jCredStash = new JCredStash(ddbBuilder.build(), kmsBuilder.build(), awsSecurityTokenService); | ||
if(envConfig.hasProxyEnv()) { |
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.
Not sure if I understand this if condition, don't we have to initialize all the clients if proxy env is provided and if not provided, like if.....else....
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.
We're still building the Clients on lines 128-131. For AWS SDK v2, client builders like the DynamoDbClientBuilder need an additional HTTP Client built-in for proxy configuration to work. The if-block there takes care of that if proxy configuration is provided but skips if it's not.
protected AWSSecurityTokenService awsSecurityTokenService; | ||
protected DynamoDB dynamoDB; | ||
protected StsClient stsClient; | ||
protected static List<String> TABLE_HEADERS = Arrays.asList("name", "component", "sdlc", "contents", "version", "updatedBy", "updatedOn", "key", "hmac", "source", "sourceType"); |
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.
Unused variable. You can remove it
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.
Good catch. Will remove.
} | ||
|
||
// Creates a new DynamoDBMapper object | ||
public DynamoDBMapper createMapper(String account, String region, String tableName) { |
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.
We don't need mapping?
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.
DynamoDBMapper is no longer supported in SDK v2. Needed to do some workarounds to keep the logic as is.
@@ -78,44 +78,60 @@ | |||
</developers> |
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.
Can we update the maven compiler plugin to line up with this PR? #65
Performed local testing using GETs, PUTs, DELETEs. Performed a couple secret rotations, pulled credential history, updated metadata.