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

I would like to add allowPrivilegeEscalation #5961

Open
JacksonChen63 opened this issue Dec 2, 2024 · 5 comments
Open

I would like to add allowPrivilegeEscalation #5961

JacksonChen63 opened this issue Dec 2, 2024 · 5 comments

Comments

@JacksonChen63
Copy link

JacksonChen63 commented Dec 2, 2024

Env: GKE 1.30.5-gke.1443001
TiDB: 8.4.0

I have try to modify the CRD tidbdashboards.pingcap.com add the securityContext.allowPrivilegeEscalation to initContinaer\ ephemeral\ containerable. After that I could add it on Kind:TidbDashboard and apply successful but still could exec pod tidbdashboard and execute su - .

Here is my tidb-dashboard and crd tidbdashboards.pingcap.com configuration.

tidb.zip

@csuzhangxc
Copy link
Member

what's the result of su -, does it succeed or ask you to enter the password?

@JacksonChen63
Copy link
Author

@csuzhangxc , it ask me enter the password

@csuzhangxc
Copy link
Member

csuzhangxc commented Dec 3, 2024

I tried to create a Pod directly with the following YAML, and it asked me to enter the password. So if we want to fully disable this, we may also need to rebuild the image.

apiVersion: v1
kind: Pod
metadata:
  name: non-root-pod
spec:
  securityContext:
    runAsNonRoot: true
  containers:
    - name: my-container
      image: pingcap/tidb-dashboard:v8.4.0
      command: ["sh", "-c", "sleep 1h"]
      securityContext:
        allowPrivilegeEscalation: false
        runAsUser: 101

@JacksonChen63
Copy link
Author

JacksonChen63 commented Dec 3, 2024

I tried to create a Pod directly with the following YAML, and it asked me to enter the password. So if we want to fully disable this, we may also need to rebuild the image.

apiVersion: v1
kind: Pod
metadata:
name: non-root-pod
spec:
securityContext:
runAsNonRoot: true
containers:
- name: my-container
image: pingcap/tidb-dashboard:v8.4.0
command: ["sh", "-c", "sleep 1h"]
securityContext:
allowPrivilegeEscalation: false
runAsUser: 101

Hi @csuzhangxc, Do you know how to do configure to fully disable this?

@JacksonChen63
Copy link
Author

Hi @csuzhangxc ,
I'm wondering to know is there have any update with it? Thanks.

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

No branches or pull requests

2 participants