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

EOS-25963: User Defined IAM user Credentials Bug fix #2

Open
wants to merge 3 commits into
base: EOS-25963_IAMUSER_ext_ak_sk
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ public class AccessKeyParameterValidator extends AbstractParameterValidator {
@Override
public Boolean isValidCreateParams(Map<String, String> requestBody) {
boolean isValid = true;
if (requestBody.containsKey("UserName")) {
isValid =
S3ParameterValidatorUtil.isValidName(requestBody.get("UserName"));
} else {
isValid = false;
}

if (requestBody.containsKey("UserName")) {
isValid =
S3ParameterValidatorUtil.isValidName(requestBody.get("UserName"));
}
if (isValid) {
isValid = isAccessKeySecretKeyCombinationValid(
requestBody.get("AccessKey"), requestBody.get("SecretKey"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void setUp() {
*/
@Test
public void Create_UserNameNull_True() {
assertFalse(accessKeyValidator.isValidCreateParams(requestBody));
assertTrue(accessKeyValidator.isValidCreateParams(requestBody));
}

/**
Expand Down