Upload apache avro file in vault

Hi,
I am a newbie in Vault. We had a requirement to upload an Apache Avro file to vault and it should be referenced by a key. The value should be the avro file/file content . Is it possible to do so without doing any base64 encoding as its not allowed in our environment?

Thanks in advance !!

First – Vault is not a storage system. There is a 1024kb limit (default) per secret max. You can override this but I would highly discourage storing non-secrets in Vault and using Vault as a storage mechanism. It can do it but you’re adding headaches for the future and severely limiting the speed of Vault by doing so.

To answer your question, you can store JSON objects in Vault but again I would advise against it – it’s safer to encode it.

$ VAULT_FORMAT=json vault status > test.json
$ vault kv put secret/test state=@test.json
== Secret Path ==
secret/data/test

======= Metadata =======
Key                Value
---                -----
created_time       2022-08-01T09:36:41.10911759Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1
$ vault kv get -field=data secret/test
map[state:{
  "type": "shamir",
  "initialized": true,
  "sealed": false,
  "t": 3,
  "n": 7,
  "progress": 0,
  "nonce": "",
  "version": "1.11.1",
  "build_date": "2022-07-19T20:16:47Z",
  "migration": false,
  "cluster_name": "basement-cluster",
  "cluster_id": "b2999e25-3cdf-bc84-533e-ddf2cdc79708",
  "recovery_seal": true,
  "storage_type": "consul",
  "ha_enabled": true,
  "is_self": true,
  "active_time": "2022-08-01T05:00:02.391107049Z",
  "leader_address": "http://127.0.0.1:8200"
}
]