-
Notifications
You must be signed in to change notification settings - Fork 26
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
How do I prevent the plugin from being disabled? #35
Comments
Running differently? https://github.com/twistlock/authz "Containerized" or standalone? |
@bviktor I haven't looked into whether an authorization plugin block
That's certainly something you can stop with the auth/z plugin. So, to answer your question, it seems like it's theoretically possible. It's worth mentioning this is less an issue with OPA or this plugin and more so a shortcoming of the Docker authorization framework. |
Could you please elaborate how? I tried to look but I've found no info on this. I'd be happy with a full block, i.e. docker members cannot do any |
Ah, I see what you've described in #34 now. If users can symlink files then they trick any checks against the bind mounts...to deal with this we could improve the plugin code to resolve filesystem paths before querying OPA. As far as blocking the |
Any updates here? @bviktor did you find any way to actually use this? |
Nope. I just keep hoping that no one figures it out in the company lol. |
@bviktor I'm running opa-docker-authz as binary on the host started via systemd as explained in https://docs.docker.com/engine/extend/plugin_api/#systemd-socket-activation Don't have a solution for the symlink problem though... for now I deny all bind mounts starting with |
Hmm... sounds interesting. How do you obtain the binary, and what's your unit file ? Thanks in advance! |
As I was too lazy to build it from source and the latest releases here on github are outdated, I just copied the binary from the ../docker/plugins/... dir.. my system units are just like described in the docker docs:
and
and of course I enabled it in {
"debug": true,
"data-root": "/containerdata/docker",
"authorization-plugins": ["opa-docker-authz"]
} |
Thanks, I'll take a look! |
How does one obtain the sources? 0.4 is the latest in the repo, but dockerhub is on 0.7 lol. |
The sources being unavailable is a different issue, the systemd activation trick actually solved this one for me too. Thanks a lot, @flixr ! One note: one has to |
Yep, just tried this when working on another issue. The relevant parts of the input would looks something like the below, when {
"Method": "POST",
"Path": "/v1.41/plugins/a21a4e016d28/disable",
"PathArr": [
"",
"v1.41",
"plugins",
"a21a4e016d28",
"disable"
],
"PathPlain": "/v1.41/plugins/a21a4e016d28/disable"
} |
So managing authorization is great and all, it's particularly a great idea via plugins (not), except for the fact that users can actually just disable the plugin right away. Yes, it's as easy as that.
You can enforce the plugin via
daemon.json
or via systemd flag, but that will only cause dockerd to fail upon the next restart of the daemon. Until then, the user is absolutely free to do whatever they want. Namely, bind mount/
, removedaemon.json
andauthz.rego
, and that's it, all the AuthZ configuration is nuked.So in essence, the value of the whole authorization process is exactly ZERO.
Am I missing something, or is it really impossible, even theoretically, to prevent users from doing whatever they want?
The text was updated successfully, but these errors were encountered: