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

Restrict access keys for users and groups to not allow '=' or ',' #19749

Merged
merged 5 commits into from
May 28, 2024

Conversation

taran-p
Copy link
Contributor

@taran-p taran-p commented May 15, 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

Returns an error if a user or group name contains the characters = or ,

Motivation and Context

Future compatibility for builtin users and LDAP

How to test this PR?

Attempt to create a new user or group with one of the restricted characters

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:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

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

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

isn't this okay to allow since the entire string is sent to MinIO unperturbed and are safer to use.

What we should avoid is .., or any other path components.

@harshavardhana
Copy link
Member

@donatello, so are we just going to restrict this according to what we agreed upon?

@donatello
Copy link
Member

@donatello, so are we just going to restrict this according to what we agreed upon?

Yes, restricting = and , in the username and group name (and valid utf8) would be good to make the internal implementation clean and to make it possible to simultaneously support ldap with internal users/groups as these names would not conflict with ldap DNs.

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

LGTM

@donatello donatello merged commit 2d53854 into minio:master May 28, 2024
20 checks passed
@taran-p taran-p deleted the restrict-new-access-keys branch May 28, 2024 22:13
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.

None yet

4 participants