Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Add minimal privileges test for backup using dynamic privs #418

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

morgo
Copy link

@morgo morgo commented Jun 7, 2021

What problem does this PR solve?

This reopens #411

I discussed it with others, and there is a limitation in ticases in that it's not possible to change the DSN and effectively test the privilege system.

This depends on pingcap/tidb#25039 merging. If Ticases can support change user, we can migrate the test at a later point.

What is changed and how does it work?

Check List

Tests

  • E2E test

Code changes

  • Has Go code change

Side effects

  • None

Related changes

  • None

Does this PR introduce a user-facing change?:

There is no imcompatibility or change - if users want to keep allocating SUPER privilege to backup operators, they can still do that. However, we should encourage principal of least privilege to our users for security best practice. So from that perspective, there is a user-facing change that using BACKUP_ADMIN and RESTORE_ADMIN will be encouraged over SUPER.

@@ -0,0 +1,48 @@
module github.com/pingcap/tipocket/testcase/dynamicprivs

go 1.15
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
go 1.15
go 1.16

Please bump the version to 1.16


// Start implements the core.StandardClientExtensions interface.
func (c *Client) Start(ctx context.Context, cfg interface{}, clientNodes []cluster.ClientNode) error {

Copy link
Member

Choose a reason for hiding this comment

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

Please remove the blank line.

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

Successfully merging this pull request may close these issues.

2 participants