Secure / Sensitive Job Parameter. Delete or modify parameter after execution?

We are using Hangfire with a SQL Server to work with secure data and therefor one Job Parameter is a “Pass-Phrase” that should not be persisted longer than necessary.

It would be okay to keep the passphrase during the job execution but we are looking for a way to delete this parameter when the job succeeded.

Is there any API to delete / modifiy a Job Parameter? I do not want to access the DB scheme by myself and search for the Job :-/

Have you tried a trigger on the Job table looking for an UPDATE event that sets StateName field to “Succeeded”, then modify the “InvocationData” and “Arguments” fields accordingly.

We thought about that … The thing is that I dont want to modify the DB directly. At some point the schema will change (or similar) and after this point we will store private data without knowing it.

I think we will go with another way:
We will give hangfire some ids to query another database for the relevant data. Deleting this data will be placed within the “BackgroundJob.ContinueWith()” Action.