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

[FEAT] Increase granularity of lockdown options #12

Closed
1 task done
HazardousBackup opened this issue Jul 13, 2024 · 5 comments
Closed
1 task done

[FEAT] Increase granularity of lockdown options #12

HazardousBackup opened this issue Jul 13, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@HazardousBackup
Copy link

Is this a new feature request?

  • I have searched the existing issues

Wanted change

As it stands there is pretty good granularity with which to add or subtract permissions, however, it'd be nice to be able to go into further detail possibly restricting or allowing individual API calls.

Reason for change

One example of why this would be beneficial is the "containers" permission.
For something like Diun, as far as I can tell it only really needs /containers/json access to be able to get the information it needs.
However, with the containers permission, it also has access to /containers/{id}/json which lets it see a large number of details about a running containers including ENV variables that might include sensitive information depending on the setup.
The containers permission also gives access to /containers/{id}/archive which allows for getting tar archives of files inside another container. The ability to grab arbitrary files from another running container is another permission that should be more heavily restricted.

Proposed code change

In the most extreme case, I'd suggest breaking all the different API calls into their own separate permission. Based on my very basic grasp of how this works, that might require just putting a ton more entries into the templates with checks for their env variables.
This might be made easier by using the OpenAPI yaml available from Docker to generate the necessary options procedurally.

Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@HazardousBackup
Copy link
Author

HazardousBackup commented Jul 13, 2024

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@HazardousBackup
Copy link
Author

I'm replying to prevent this issue from being closed. I've put in a possible pull request and am waiting for further comments or information on how to progress this.

@thespad
Copy link
Member

thespad commented Sep 10, 2024

We've discussed this internally and decided not to implement it; if users need the level of granular filtering suggested they would be better off with a tool designed for that purpose such as CetusGuard. The nature of this image means implementing detailed filtering of API endpoints would commit us to monitoring and updating every API change made by Docker to ensure it remained functional and it's not something we have the resources to practically do.

@thespad thespad closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants