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

Fix regression that causes mc idp ldap accesskey create to error #4938

Closed
wants to merge 2 commits into from

Conversation

taran-p
Copy link
Contributor

@taran-p taran-p commented May 20, 2024

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

Fix error that causes any mc idp ldap accesskey create without a specified expiration time to fail

Motivation and Context

How to test this PR?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

@taran-p taran-p requested a review from donatello May 20, 2024 18:15
@harshavardhana
Copy link
Member

Fix error that causes any mc idp ldap accesskey create without a specified expiration time to fail

what is the error?

@taran-p
Copy link
Contributor Author

taran-p commented May 20, 2024

Error was mc: <ERROR> Unable to add service account. the expiration time should be in the future. The command previously sent the unix epoch time if the expiration time was not defined, but now it just sends a nil pointer.

@taran-p taran-p requested a review from harshavardhana May 21, 2024 16:46
@@ -165,8 +167,7 @@ func accessKeyCreateOpts(ctx *cli.Context, targetUser string) madmin.AddServiceA
}
} else if expDurVal != 0 {
exp = time.Now().Add(expDurVal)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this value passed? I see that this being ignored.

@harshavardhana
Copy link
Member

#4939 should address, the code itself was not readable using too many variables to do one thing.

I have restructured things and made it more readable PTAL lets close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants