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

Problems with EXPRESSION_VALUE when working with Vault parameters. #239

Open
mafriedel opened this issue May 14, 2018 · 1 comment
Open

Comments

@mafriedel
Copy link

I am trying to add a vault to an ldap_connection.

wildfly::resource { '/core-service=management/ldap-connection=ad_ldap_connection':
content => {
'search-credential' => '${VAULT::jboss-binda::password::1}',
'url' => 'ldaps://ldap.company.com:636',
'search-dn' => "CN=${service_account},OU=Service Accounts,DC=corp,DC=company,DC=com",
},
}

This results in a correct standalone.xml, which works with the Vault properly.

    <outbound-connections>
        <ldap name="ad_ldap_connection" url="ldaps://ldap.company.com:636" search-dn="CN=jboss-binda,OU=Service Accounts,DC=corp,DC=company,DC=com" search-credential="${VAULT::jboss-binda::password::1}" security-realm="adSSLRealm"/>
    </outbound-connections>

However on subsequent puppet runs it produces this:

Notice: /Stage[main]/Profile::Jboss_base/Wildfly::Resource[/core-service=management/ldap-connection=ad_ldap_connection]/Wildfly_resource[/core-service=management/ldap-connection=ad_ldap_connection]/state: state changed '{"search-credential"=>{"EXPRESSION_VALUE"=>"${VAULT::jboss-binda::password::1}"}}' to '{"search-credential"=>"expression "${VAULT::jboss-binda::password::1}""}'

Note the "EXPRESSION_VALUE".

I think it's coming from the script trying to find the value and getting the word "expression" in the results set.

[standalone@0.0.0.0:9993 /] /core-service=management/ldap-connection=ad_ldap_connection:read-attribute(name=search-credential)
{
"outcome" => "success",
"result" => expression "${VAULT::jboss-binda::password::1}"
}

@mafriedel
Copy link
Author

mafriedel commented May 14, 2018

Without a Vault being defined the read-attribute results in:

[standalone@0.0.0.0:9993 /] /core-service=management/ldap-connection=ad_ldap_connection:read-attribute(name=search-credential)
{
"outcome" => "success",
"result" => "bRarm8e0/)R1[eW"
}

@mafriedel mafriedel changed the title Idempotency issues when working with a vault. Problems with EXPRESSION_VALUE when working with Vault parameters. May 16, 2018
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

1 participant