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 create secret error with argument too long #3428

Closed
ssubramanian123 opened this issue Oct 5, 2017 · 4 comments
Closed

vault create secret error with argument too long #3428

ssubramanian123 opened this issue Oct 5, 2017 · 4 comments

Comments

@ssubramanian123
Copy link

vault create secret error with argument too long

Hi,

I am trying to store application config as secret in vault. It works perfect, but 2 configs files are very big in size (around 2K and 5K lines) for those files getting argument too long error. Do we have any limit in size of secret? If need to increase the size, how to increase it? Please help.

cat test.config | base64 -w 0 > base64.txt
export B64=$(cat base64.txt )
vault write secret/config-test/$(basename test.config) vaule="$B64"
bash: /usr/bin/basename: Argument list too long
bash: /usr/local/bin/vault: Argument list too long
cat test1700.config | base64 -w 0 > base64.txt
export B64=$(cat base64.txt )
vault write secret/config-test/$(basename test1700.config) vaule="$B64"
Success! Data written to: secret/config-test/test1700.config
@ssubramanian123
Copy link
Author

@jefferai looks database column has enough size might be issue in vault code base.. Can you please review and confirm.

MySQL [k8svault_dev]> DESCRIBE vault;
+-------------+----------------+------+-----+---------+-------+
| Field       | Type           | Null | Key | Default | Extra |
+-------------+----------------+------+-----+---------+-------+
| vault_key   | varbinary(512) | NO   | PRI |         |       |
| vault_value | mediumblob     | YES  |     | NULL    |       |
+-------------+----------------+------+-----+---------+-------+

@joelthompson
Copy link
Contributor

@ssubramanian123 -- the error you're getting is coming from bash, not Vault. The bash shell can't handle all that data on the command line. For that size data, you should either use stdin or a file.

@ssubramanian123
Copy link
Author

@joelthompson Thank you very much.. let me try stdin or file and update here..

@ssubramanian123
Copy link
Author

@joelthompson it works fine with file.

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

2 participants