Does a custom secret engine use the configured storage backend to make the data persistent?

Hi!
I’m thinking about writing a custom secret engine and i am following the tutorial steps (Build Your Own Plugins | Vault - HashiCorp Learn) and looking at the examples backend source (vault-guides/backend.go at master · hashicorp/vault-guides · GitHub).

Within the struct the store map is located (vault-guides/backend.go at 74fa928187bee6906cb0ef51c71903b80e4ab1b6 · hashicorp/vault-guides · GitHub)

type backend struct {
	*framework.Backend
	store map[string][]byte
}

Every operation in this plugin is done on that store map. However, i wonder how the data can be made persistent using the storage backend. I couldn’t find a reference somewhere that targets that question.

Thanks and Regards
Armin

How odd that the example would use that technique… It’s completely unsuitable for a real plugin.

Real plugins call methods on req.Storage to work with their stored data - e.g. vault-plugin-auth-jwt/path_role.go at main · hashicorp/vault-plugin-auth-jwt · GitHub

Thanks! I found that Put methods in other plugins already. Now i know for sure! Thanks a lot!