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

Question about encrypted credentials #75

Open
tomer-ds opened this issue Jul 5, 2020 · 3 comments
Open

Question about encrypted credentials #75

tomer-ds opened this issue Jul 5, 2020 · 3 comments

Comments

@tomer-ds
Copy link

tomer-ds commented Jul 5, 2020

Hi,

Firstly... awesome work!!! Very informative, and VERY useful!!!

I did have a question regarding the credential credentials configuration seen in the various yaml configurations throught the built result.
They seem to be encrypted and I am having trouble understanding how this was done.
Since I won't be working with the lab, and will be attempting to make use of this in conjunction with my project I am looking to encrypt and configure the credentials in a way that merges with my requirements.

Could you help with an explanation, or maybe pointing me to the part of the full workshop that goes into this?

@tomer-ds
Copy link
Author

tomer-ds commented Jul 5, 2020

Example:

Credential: '[ENC=PE9ianMgVmVyc2lvbj0iMS4xLjAuMSIgeG1sbnM9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vcG93ZXJzaGVsbC8yMDA0LzA0Ij4NCiAgPE9iaiBSZWZJZD0iMCI+DQogICAgPFROIFJlZklkPSIwIj4NCiAgICAgIDxUPlN5c3RlbS5NYW5hZ2VtZW50LkF1dG9tYXRpb24uUFNDdXN0b21PYmplY3Q8L1Q+DQogICAgICA8VD5TeXN0ZW0uT2JqZWN0PC9UPg0KICAgIDwvVE4+DQogICAgPE1TPg0KICAgICAgPE9iaiBOPSJLZXlEYXRhIiBSZWZJZD0iMSI+DQogICAgICAgIDxUTiBSZWZJZD0iMSI+DQogICAgICAgICAgPFQ+U3lzdGVtLk9iamVjdFtdPC9UPg0KICAgICAgICAgIDxUPlN5c3RlbS5BcnJheTwvVD4NCiAgICAgICAgICA8VD5TeXN0ZW0uT2JqZWN0PC9UPg0KICAgICAgICA8L1ROPg0KICAgICAgICA8TFNUPg0KICAgICAgICAgIDxPYmogUmVmSWQ9IjIiPg0KICA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lR5cGUiPlN5c3RlbS5NYW5hZ2VtZW50LkF1dG9tYXRpb24uUFNDcmVkZW50aWFsPC9TPg0KICAgIDwvTVM+DQogIDwvT2JqPg0KPC9PYmpzPg==]'

@raandree
Copy link
Contributor

raandree commented Jul 5, 2020

I would recommend using this repo as a template. The build scripts turned out to be most useful as many best practices and experience from the last year has been integrated.

The credentials are encrypted with a fixed pass phrase - not the best practice but quite flexible for the context of this workshop. The pass phrase is stored in the Datum.yml.

@nyanhp has described all this in more detail in DSC Configuration data encryption done right.

@rcfmartin
Copy link

Here's the updated link to the blog post. The link above does not work.
https://www.janhendrikpeters.de/en/post/dsc-configuration-data-encryption-done-right/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants