Replies: 2 comments 4 replies
-
Hi @ghrltu, OpenTofu is not designed to be used in the way you've described, so before we get into the details I want to just give a general caution that we're going to be discussing current implementation details rather than committed constraints we will definitely preserve in future releases of the project, and any guidance I'm going to give below is not necessarily complete nor aligned with your specific threat model. Ultimately it will be your responsibility to study each release of OpenTofu carefully yourself to ensure that it meets your needs. With that said...
If I were implementing something like what you've described, with constraints similar to those you have listed, I expect I'd go a little further and not let third-parties directly provide OpenTofu modules at all, and instead require them to provide a bespoke configuration format tailored to your system and then translate that carefully to OpenTofu configuration purely as an implementation detail so that the potential scope of that configuration is limited only to what the transpiler allows. Of course there could still be bugs in the transpiler that would leave gaps, but this alternative is effectively an allowlist-based approach rather than a denylist-based approach and that tends to be easier to secure because there's less exposure to "unknown unknowns". Ultimately you're going to need to conduct your own careful security review to be sure that your system meets all of the guarantees you want it to meet, but I hope the notes above are a helpful starting point. |
Beta Was this translation helpful? Give feedback.
-
Okay, I figured out the provider guardrails mentioned previously. I'd failed to grok the distinction between
Regarding namespaces: Yep, I get it. Ideally we'd be running Thank you again, @apparentlymart for so generously providing guidance around this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm kicking around an idea which boils down to:
tofu
on behalf of 3rd parties.tf
filesThere seems like a bunch of potential for abuse from malicious tofu configurations, so I'd like to explore whether it can be done safely.
I'd be running my
tofu
binary and my provider binary against my API, using configurations sourced from untrusted 3rd parties.Mitigations and controls I'm thinking about:
tofu
service so that it can only reach my provider registry and the intended API serviceAm I off my rocker? Can this be done safely?
Beta Was this translation helpful? Give feedback.
All reactions