In short I am trying to figure out the best way to store global variable -like information from policies so that the stored variables are not reset with driver or vault restarts.
Here is the scenario. I have a REST JSON source from where I query objects and the JSON source gives me certain number of results at a time. In addition to the result set I get two additional JSON variables:
- numerical index describing the index of the last included result object
- boolean variable if there is more results available
I can use the numerical index to query the next N objects, starting from the index until the boolean variable indicates there is no more data. This way I can make larger queries as well as regular interval operation.
For example I get a result set of 1000 JSON objects with last index and boolean variables such as this:
- "myindex": 24123
- "havemore": true
I need to save the index to a global variable, LDAP object or somewhere else so that it can be accessed next time the REST query is launched to receive the results since last poll. I could also do driver wide variable but it would be reset every time driver is restarted resulting to a huge query of all objects.
My question is what would be most convenient way / place to store such non destructible data? Having an LDAP object is easy but it is subject to accidental delete / modification. I am leaning towards a global variable LDAP object but would appreciate suggestions.
Edit: Never used before but resource objects seem to be quite simple for this?