-
Notifications
You must be signed in to change notification settings - Fork 3
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
There is a draft plan for implementing support for deferred mode #104
Comments
|
Noting here: this might be as simple as wrapping the Conjur lookup in |
|
Tried to run a manifest with The result was an error on the agent side: It seems that the |
|
A bit deeper info on the error: Test manifest: File { backup => false }
node default {
if ($facts['windows_puppet_agent']) {
$pem_file = 'c:/tmp/test.pem'
} else {
$pem_file = '/tmp/test.pem'
}
notify { "Including conjur module...": }
include conjur
notify { "Grabbing 'inventory/db-password' secret...": }
$secret = Sensitive(Deferred(conjur::secret, ['inventory/db-password']))
notify { "Writing secret '${secret.unwrap}' to $pem_file...": }
file { $pem_file:
ensure => file,
content => $secret,
}
notify { "Done!": }
}
Trace output: Error: Failed to apply catalog: undefined method `variable_value' for nil:NilClass
/opt/puppetlabs/puppet/cache/lib/puppet/functions/conjur/secret.rb:18:in `secret'
/opt/puppetlabs/puppet/cache/lib/puppet/functions/conjur/secret.rb:23:in `with_defaults'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:60:in `invoke' Relevant code section where def secret client, account, id, token
token = token.unwrap if token.respond_to? :unwrap
sensitive.new client.variable_value account, id, token #Exception occurs here since client is 'nil'
end
def with_defaults id
scope = closure_scope
secret scope['conjur::client'], scope['conjur::authn_account'], id, scope['conjur::token']
end |
|
Preliminary research:
Not a valid diff but it shows the most relevant changes to get |
|
PoC with agent-provided credentials |
|
This is now complete with #179 merged with the following items left to be done:
|
We support both
Included in the documentation on main branch
Puppet 6 server and agent
Puppet will prevent running this code on puppet 5 as it does not support deferred functions. |
In Milestone 3 of #20, we'll be adding support for the Puppet integration to leverage deferred functions to delegate secret retrieval to Puppet agents.
From the epic:
In this spike, we'll research what will be required to add this support. Note: we must add this support so that this module continues to support Puppet 5, which means that it must be configurable whether to operate in deferred mode or not.
AC:
The text was updated successfully, but these errors were encountered: