-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Pantheon Secrets Support #260
Comments
Lol thanks @dustinleblanc for bumping this! I would say with the Lando v4 service API nearing feature completeness we're on the cusp of redoing all services/recipes, so my personal excitement may be lower until that happens, but would love to get it moving. |
@dustinleblanc What is the goal here? The Pantheon Secrets service was not designed to manage local secrets. The only way that secrets could be visible to Lando would be if they were given the scope "user", or if you added your own "get secrets" REST endpoint that ran on your Pantheon environment, and returned values via We could consider simple adjustments to Pantheon secrets, e.g. perhaps automatically removing the "user" scope for environment overrides of the live environment. Then, Lando users would need to know to apply the "user" scope to secrets they wanted to share with a local development environment, and Lando would also need a Terminus machine token to fetch secrets via an alternate path when running locally. Disclaimer: this is brainstorming on what is possible / desired, not a commitment for development. |
@greg-1-anderson thanks for chiming in. The goal is the "most seamless possible experience for devs when setting up a site and pulling it down", which is more or less what the Pantheon recipe for Lando has been doing for years now. I personally think that even if a dev had to do something like update their .lando.yml to specify the secrets and store them in an .env or something, maybe that would still be a fairly intuitive experience? I'd love to just help ease the support in whatever way requires the least changes outside of the plugin code that is possible and if there is a way this can be achieved without the end developer having to modify the site code (even via settings.local.php if it could be helped). Even if there were a terminus way to get the secrets values and exfiltrate them to local and Lando could hook into that and just setup the appserver container so that the The existing Lockr integration worked by lando getting its hands on the binding.pem and then essentially spoofing that it was on a Pantheon server (as best as I remember the code), which allowed Lockr to accept requests from the dev's local machine. This made things fairly seamless once a dev authenticated with their Terminus token. TLDR, there are probably a number of ways to tackle this, but I just suspect there are many who will appreciate the tackling, and therefore I am glad the discussion hath commenced. |
@dustinleblanc if the requirement is just to fake secrets locally then https://docs.pantheon.io/guides/secrets/local provides manual steps for integrating Pantheon Secrets PHP SDK with Lando. Assuming the Drupal module you referenced uses the PHP SDK (seems to) and the factory method, then as long as
In terms of Lando Pantheon Plugin adjustments to support the manual integration, it would be nice if we could: Use Use
Having said all that, it sounds like Lockr integration may have been allowing access to real secrets? If so, I don't think that requirement would be satisfied by the fake client, unless the secret is in the For our use case we prefer not to have the actual
Outcome is the value
The above approach is not secure for cases where values can't be faked e.g., API keys to third party services. To make it more robust, short of opening up Pantheon Secrets service to manage local secrets (which it was not designed to do as noted by @greg-1-anderson), it would good if the locally generated file could be encrypted at rest, and perhaps only available on the Lando container i.e., not in the local mount; similar to how the secrets cache works in temporary directory on the Pantheon containers. In this case having |
@lwalley Sorry just saw this today, very cool! Thanks for doing all that research. You mentioned Ansible Vault, we use 1password as a company so some kind of use of 1password secrets service would also be quite cool. |
Friends, Countryman, Beltalowda,
It is with great sadness that we see the sunsetting of the great and useful Lockr.io, and our team is beginning the transition to Pantheon's shiny new secrets system. Lockr was so well integrated into the Pantheon recipe due to the hard work of @pirog and Chris at Lockr, it would be great to reproduce such awesomeness with the new native secrets system.
Alas, I know time is money, and as Sweet Brown once said, Ain't nobody got time for that! So I figured as a first duty, lets get the issue open, and then see what folks at Pantheon (@greg.1.anderson or @kporras07?) might be willing to give us some hints on implementation. Source code for their module is here: https://git.drupalcode.org/project/pantheon_secrets
Lets see if the community can come together to get this feature handled.
The text was updated successfully, but these errors were encountered: