--- layout: "docs" page_title: "Secret Backend: Generic" sidebar_current: "docs-secrets-generic" description: |- The generic secret backend can store arbitrary secrets. --- # Generic Secret Backend Name: `generic` The generic secret backend is used to store arbitrary secrets within the configured physical storage for Vault. If you followed along with the getting started guide, you interacted with a generic secret backend via the `secret/` prefix that Vault mounts by default. You can mount as many of these backends at different mount points as you like. Writing to a key in the `generic` backend will replace the old value; sub-fields are not merged together. This backend honors the distinction between the `create` and `update` capabilities inside ACL policies. **Note**: Path and key names are _not_ obfuscated or encrypted; only the values set on keys are. You should not store sensitive information as part of a secret's path. ## Quick Start The generic backend allows for writing keys with arbitrary values. A `ttl` value can be provided, which is parsed into seconds and round-tripped as the `lease_duration` parameter in requests. Specifically, this can be used as a hint from the writer of a secret to consumers of a secret that the consumer should wait no more than the `ttl` duration before checking for a new value. If you expect a secret to change frequently, or if you need clients to react quickly to a change in the secret's value, specify a low value of `ttl`. Also note that setting `ttl` does not actually expire the data; it is informational only. As an example, we can write a new key "foo" to the generic backend mounted at "secret/" by default: ``` $ vault write secret/foo \ zip=zap \ ttl=1h Success! Data written to: secret/foo ``` This writes the key with the "zip" field set to "zap" and a one hour TTL. We can test this by doing a read: ``` $ vault read secret/foo Key Value lease_duration 3600 ttl 1h zip zap ``` As expected, we get the value previously set back as well as our custom TTL both as specified and translated to seconds. The duration has been set to 3600 seconds (one hour) as specified. ## API #### GET