GithubHelp home page GithubHelp logo

zuazo / chef-encrypted-attributes Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 8.0 689 KB

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

Ruby 100.00%
chef credentials devops encrypted-attributes encryption gcm keys passwords pki plugin secrets security

chef-encrypted-attributes's People

Contributors

e100 avatar joshk avatar zuazo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chef-encrypted-attributes's Issues

Need Chef::EncryptedAttribute.exist_on_node? method (and RemoteNode class) to use knife search query keys rather than only node's name

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: constant ::Fixnum is deprecated

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

Exception: NameError: uninitialized constant Chef::REST

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.