-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Recipe Secrets Section #6421
Recipe Secrets Section #6421
Conversation
Related to #5493 |
Original design #5556 |
Following discussion at Triage on Thursday, I think this has tried to mix the idea of So I will rework this to be specifically secret related, and we can look at parameters later. |
Not sure if in anyway related, but I recently submitted PR #6422 for a new OC module that uses Azure Key Vault to retrieve secrets from the vault. I use Key Vault heavily in my day to day to protect my passwords, connection strings etc. |
@JoshLefebvre definitely related, and partly why I included the ability to easily migrate / store these secrets in I lost the thread, but I am interested, somewhere you commented that you would likely use the Do you plan to do this? |
I suppose I only meant that of the options presented, the encrypted option seemed the most secure, therefore I would have been most likely to use this (provided there was a good example showing how to do so). However if I am able to read it through the IConfiguration at runtime then I can simply read from my KeyVault and never have to store it in plain text in my source code. |
Thanks, was just curious, as hoping I have covered all bases :) |
# Conflicts: # src/OrchardCore.Modules/OrchardCore.Email/OrchardCore.Email.csproj # src/OrchardCore/OrchardCore.Recipes.Core/Services/RecipeExecutor.cs
Will it be ready for 1.0? |
This pr to be replaced by the secrets module demo here https://www.youtube.com/watch?v=qPCBgHQYz1g Maybe not ready for 1.0 will see how much time I have |
Bumping this topic. Should this be merged? |
Can you fix the conflict issue, so we can move on |
There's no plan for this? what about Secret Module #7891? |
Edited and refactored comments below
This introduces the idea of aProperties
section in a recipe / deployment plan.The idea is that it provides a standard way of configuring 'special' properties, such as passwords, so that recipes / deployment plans can still use them, in an appropriate context.
I've done this for the
SmtpSettings
.A setting which should be protected, such as the smtp password, now has 4 options to choose from when creating a deployment step.
UserSupplied
- the property will be created and the user is expected to complete this value manuallyPlainText
- the password will be decrypted and stored as plain text in the plan. This option will only work if you are transfering server to server. It will error if you try and export it to a file.Encrypted
- the property will be stored in the recipe as an encrypted value. To work on another server the data protection key will have to be present on both servers (i.e. use dataprotection.azure and push both servers to the same blob store.)Ignored
- the property will be completely ignored (which stops it being overwritten if it's already been set on the target server.The reason for introducing a
properties
section here, is that it later, gives us the ability to parse this section, and provide in the ui, or in a setup context, a form, for the user to actually complete these values as part of the setup process.This would only show the
UserSupplied
properties, for example.It also allows you (oob) to extract this
properties
section, and cut and paste it directly into yourappsettings.Development.json
file under the sectionOrchardCore_Recipes
.The idea behind this is to be able to configure development secrets, via usersecrets, or environment variables, so that the properties are all in one place and reasonably visible.
/cc @Piedone