Skip to content

Commit

Permalink
Merge pull request #3 from STACK-Fintech/client/handle-null-on-clear
Browse files Browse the repository at this point in the history
fix: handle null on clearCredentials call
  • Loading branch information
kjdelisle committed Jun 20, 2019
2 parents c400bc9 + e964de2 commit 1b8225c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.5.1](https://github.com/STACK-Fintech/kafka-auth-aws-iam/compare/v0.5.0...v0.5.1)

> 20 June 2019
- fix: handle null on clearCredentials call [`#3`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/pull/3)
- fix: add thanks for changelog tool [`#2`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/pull/2)
- chore: add plug [`#1`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/pull/1)
- chore: add LICENSE [`ea2209f`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/commit/ea2209fb7ef6edc7b1b82cb4d2a084101ea6152f)

#### [v0.5.0](https://github.com/STACK-Fintech/kafka-auth-aws-iam/compare/v0.4.1...v0.5.0)

> 20 June 2019
- feat: handle assumed roles correctly [`cb61455`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/commit/cb6145525953f072bb5cbda43f574b67d6354222)
- feat: handle assumed roles correctly [`7c4ea9a`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/commit/7c4ea9aaac2f0638a75732d93f38d1f2382b5dba)
- chore: add CHANGELOG [`63bb74e`](https://github.com/STACK-Fintech/kafka-auth-aws-iam/commit/63bb74ee74f7e20d255e81720e825e1010ddaf99)

#### [v0.4.1](https://github.com/STACK-Fintech/kafka-auth-aws-iam/compare/v0.4.0...v0.4.1)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.stack.security.auth.aws</groupId>
<artifactId>kafka-auth-aws-iam</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,21 @@ public boolean isComplete() {
}

private void clearCredentials() {
for (int i = 0; i < accessKeyId.length; i++) {
accessKeyId[i] = (byte) 0;
if (accessKeyId != null) {
for (int i = 0; i < accessKeyId.length; i++) {
accessKeyId[i] = (byte) 0;
}
accessKeyId = null;

}
accessKeyId = null;

for (int i = 0; i < secretAccessKey.length; i++) {
secretAccessKey[i] = (byte) 0;
if (secretAccessKey != null) {
for (int i = 0; i < secretAccessKey.length; i++) {
secretAccessKey[i] = (byte) 0;
}
secretAccessKey = null;
}
secretAccessKey = null;

// Session token isn't required, so check before trying to zero it out!
if (sessionToken != null && sessionToken.length > 0) {
for (int i = 0; i < sessionToken.length; i++) {
sessionToken[i] = (byte) 0;
Expand Down

0 comments on commit 1b8225c

Please sign in to comment.