Skip to content

Fail loading an ACL config if the provided file is empty and enforceT… #176

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

Open
wants to merge 2 commits into
base: release-21.0-github
Choose a base branch
from

Conversation

mhamza15
Copy link

@mhamza15 mhamza15 commented Aug 7, 2025

…ableACLConfig is true (vitessio#17274)

This is a backport of vitessio#17274

Description

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

…ableACLConfig is true (vitessio#17274)

Signed-off-by: garfthoffman <[email protected]>
Signed-off-by: Mohamed Hamza <[email protected]>
Co-authored-by: Mohamed Hamza <[email protected]>
@mhamza15 mhamza15 self-assigned this Aug 7, 2025
@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 16:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation to fail ACL config loading when the provided file is empty and enforceTableACLConfig is true. It's a backport of a change from the main branch to ensure proper error handling for empty ACL configuration files.

  • Adds validation to reject empty ACL configuration files
  • Includes test coverage for the new empty file validation behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go/vt/tableacl/tableacl.go Adds empty file validation in the init method to return an error when config file is empty
go/vt/tableacl/tableacl_test.go Adds test case to verify error handling for empty ACL config files

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.

2 participants