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

Vault decrypt does not work #205

Open
Malizor opened this issue Apr 10, 2024 · 0 comments
Open

Vault decrypt does not work #205

Malizor opened this issue Apr 10, 2024 · 0 comments
Labels

Comments

@Malizor
Copy link

Malizor commented Apr 10, 2024

Jenkins and plugins versions report

Environment
OS: Linux - 4.18.0-513.18.2.el8_9.x86_64
Java: 11.0.22 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

Ansible plugin version 307.va_1f3ef06575a_

What Operating System are you using (both controller, and any agents involved in the problem)?

Runing on Debian Bullseye nodes, with Ansible 2.10.8

Reproduction steps

With a Jenkinsfile like:

withCredentials([file(credentialsId: 'ansible-vault-dev-password', variable: 'ansibleVaultKeyFile')]) {
  ansibleVault(
      action: "decrypt",
      input: "./secret_file/ansible_ecdsa",
      output: "./secret_file/ansible_ecdsa",
      vaultCredentialsId: ansibleVaultKeyFile
  )
}

Expected Results

No error.

Actual Results

[Pipeline] ansibleVault
[XXX] $ ansible-vault decrypt ./secret_file/ansible_ecdsa ./secret_file/ansible_ecdsa
/usr/lib/python3.11/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Vault password: [WARNING]: Error in vault password prompt (default): EOFError (ctrl-d) on
prompt for (default)
ERROR! EOFError (ctrl-d) on prompt for (default)
FATAL: command execution failed
hudson.AbortException: Ansible vault execution failed
	at org.jenkinsci.plugins.ansible.AnsibleVaultBuilder.perform(AnsibleVaultBuilder.java:155)
	at org.jenkinsci.plugins.ansible.workflow.AnsibleVaultStep$AnsibleVaultExecution.run(AnsibleVaultStep.java:230)
	at org.jenkinsci.plugins.ansible.workflow.AnsibleVaultStep$AnsibleVaultExecution.run(AnsibleVaultStep.java:190)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate2(ACL.java:451)
	at hudson.security.ACL.impersonate(ACL.java:463)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Anything else?

No response

Are you interested in contributing a fix?

No response

@Malizor Malizor added the bug label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant