Closed niven01 closed 9 years ago
any thoughts on this?
@niven01 its not immediately clear to me what this solves, that couldn't be solved by calling the resource from a wrapper cookbook with whichever custom attributes. Could you provide a few examples of data_bag structure you are working with, redacting any confidential data of course?
hmm, ok. Seems I may have missed something then. Anyway, example of data bag structure:
[node.chef_environment]['vhost']['cert'] [node.chef_environment]['vhost']['cert_key']
{
"id": "website1",
"staging": {
"vhost": {
"port": 80,
"server_name": "staging.website1.com",
"server_alias": [
"test-staging.website1.com"
],
"ssl": false,
"cert": "",
"cert_key": "",
"ca_file": ""
},
"database": {
"db_name": "db1",
"db_user": "db1",
"db_password": "aSecret",
"additional_db_users": {
"user1": "aSecret",
"user2": "aSecret"
}
}
},
"production": {
"vhost": {
"port": 80,
"server_name": "www.website1.com",
"server_alias": [
"test-www.website1.com"
],
"ssl": true,
"cert": "-----BEGIN CERTIFICATE-----",
"cert_key": "-----BEGIN RSA PRIVATE KEY-----",
"ca_file": "CA_SSL.crt"
},
"database": {
"db_name": "db1",
"db_user": "db1",
"db_password": "aSecret",
"additional_db_users": {
"user1": "aSecret",
"user2": "aSecret"
}
}
}
}
Hi,
I was in the process of writing my own certificate cookbook and one of my colleagues pointed me to yours. I believe he met you recently at a Chef summit or similar. He told me you were keen for the community to contribute.
This PR add the data bag type `custom' which allows me to handle how I store and retrieve the certificates. I have quite a few scenarios where there is an existing data bag structure that does not meet your cookbook requirements.
I did submit a PR previously but decided it was more complicated than it needed to be and was in effect a rewrite. https://github.com/atomic-penguin/cookbook-certificate/pull/48
Have a look and let me know your thoughts on this. I'm keen to keep on using your cookbook but I do need the flexibility of my own data bag structure.
The resource will be as follows:
I've also added a remove action to delete certificates