Since Vault writes out the request data as a global, the key to mocking the data accurately is to set the data as a global value versus a mocked import.
You can see examples at: https://www.vaultproject.io/guides/identity/sentinel#step-2-test-the-sentinel-policies
Those examples don’t mock
request.data specifically, but you can just add a key there for that. Enter the structured data there - so the data as a JSON object, not as raw string data.
The data is different from request to request, but a good place to start would be to just try
mocking your key/value pairs.
You want to structure the data as you would send it to Vault. For the key/value store, that means something like:
You can see the KV version 2 API docs page for more payload examples.
Note that all request data is structured, so you should not need the json import to parse the data (unless your KV value data data is JSON itself, of course).
Hope this helps!