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

What would be the best way to allow ContainerUser to create symlinks? #167

Closed
TBBle opened this issue Oct 18, 2021 · 18 comments
Closed

What would be the best way to allow ContainerUser to create symlinks? #167

TBBle opened this issue Oct 18, 2021 · 18 comments
Assignees

Comments

@TBBle
Copy link

TBBle commented Oct 18, 2021

Coming from tektoncd/pipeline#1826 (comment), we have an application that relies on creating symlinks, and so on Windows Containers it cannot function as ContainerUser, but must be ContainerAdministrator or fails as follows:

Creating a symlink "/tekton/steps/0": symlink \tekton\steps\step-hello-windows /tekton/steps/0: A required privilege is not held by the client.

I saw mention that HCS does not currently support configuring privileges, so I assume that adding an option under a Kubernetes Pod's securityContext.windowsOptions is not currently feasible as that must pass through CRI and eventually to the runhcs-provided shim.

My proposed but untested workaround is to have the container image contain a RUN for ntrights to grant the SeCreateSymbolicLinkPrivilege to ContainerUser, but that requires either the ntrights tool or a workalike, and assumes that grant persists when committing the layer and later running from it.

Is there a better way to do this?

Is there any chance SeCreateSymbolicLinkPrivilege could be granted to ContainerUser by default, or support added to HCS to grant extra privileges (either a specifically supported list, or arbitrary by name) to the user running in the container? I assume both of these options would require changes in HCS, and hence are probably not feasible for Windows Server 2022, but it'd be good to confirm that.

@TBBle TBBle changed the title What would be the best way to allow ContainerUser to create Symlinks What would be the best way to allow ContainerUser to create Symlinks? Oct 18, 2021
@TBBle TBBle changed the title What would be the best way to allow ContainerUser to create Symlinks? What would be the best way to allow ContainerUser to create symlinks? Oct 18, 2021
@ghost
Copy link

ghost commented Nov 25, 2021

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

6 similar comments
@ghost
Copy link

ghost commented Dec 26, 2021

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Jan 25, 2022

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Feb 25, 2022

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Mar 28, 2022

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Apr 28, 2022

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented May 29, 2022

This issue has been open for 30 days with no updates.
@msjingli, @brasmith-ms, please provide an update or close this issue.

@brasmith-ms
Copy link
Contributor

Hey @TBBle, thanks for bringing this up. Unfortunately, I believe the ntrights tool is the best option for this. Let me bring this back to the team and we can see how feasible this would be in the short term.

@ghost
Copy link

ghost commented Jul 2, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

8 similar comments
@ghost
Copy link

ghost commented Aug 1, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Sep 1, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Oct 2, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Nov 1, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Dec 2, 2022

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@ghost
Copy link

ghost commented Jan 2, 2023

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@microsoft-github-policy-service
Copy link
Contributor

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@microsoft-github-policy-service
Copy link
Contributor

This issue has been open for 30 days with no updates.
@brasmith-ms, please provide an update or close this issue.

@brasmith-ms
Copy link
Contributor

Revisiting this thread, if symlinks are still absolutely needed to the container ntrights is still going to be the best tool and run that using ContainerAdministrator. There may be an avenue to accomplish access permissions for ContainerUser via host configuration using HostProcess containers but that may be a bit of a hack.

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

No branches or pull requests

4 participants