zuazo / chef-encrypted-attributes Goto Github PK
View Code? Open in Web Editor NEWChef plugin to add Node encrypted attributes support using client keys.
Home Page: https://zuazo.github.io/chef-encrypted-attributes/
License: Apache License 2.0
Chef plugin to add Node encrypted attributes support using client keys.
Home Page: https://zuazo.github.io/chef-encrypted-attributes/
License: Apache License 2.0
I'm running into a problem where Chef::EncryptedAttribute.exist_on_node?(name-of-my-node) is returning multiple nodes due to the fact that I have metadata on other nodes with the same 'name = name-of-my-node' data. In our current Chef environment, we believe this is perfectly acceptable and necessary data. An example of this occurring is the metadata a proxmox server may need. According to the knife search documentation, 'When nested fields are present in a JSON structure, the chef-client will extract those nested fields to the top-level, flattening them into compound fields that support wildcard search patterns.' which means Chef's search is working properly given the search criteria.
I'm logging this as an issue first before proposing a pull request because I'm not sure how to fix this without breaking backwards compatibility. I think the way chef-encrypted-attribute currently searches for the nodes to encrypt for (using the usual search query keys rather than hardcoding a specific key to search on) seems a reasonable way to find the node that the encrypted attribute exists on. But I'm not sure how to make this change and not break backwards compatibility.
Finally, is there any other way around this? Am I not using Chef::EncryptedAttribute.exist_on_node? properly?
Thanks
Warning:
.chefdk/gem/ruby/2.4.0/gems/chef-encrypted-attributes-0.9.0/lib/chef/encrypted_attribute/cache_lru.rb:66: warning: constant ::Fixnum is deprecated
.chefdk/gem/ruby/2.4.0/gems/chef-encrypted-attributes-0.9.0/lib/chef/encrypted_attribute/config.rb:60: warning: constant ::Fixnum is deprecated
When using:
โบ chef --version
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1
Upgraded ChefDK and now knife encrypted attribute give me an error.
Chef Development Kit Version: 0.15.15
chef-client version: 12.11.18
Line 378 /lib/chef/encrypted_attribute/search_helper.rb is the problem.
Chef::REST is depreciated, simply replacing it with Chef::ServerAPI resolved the error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.