0

Is there a way that a program could create a file (this is all within a Windows environment) such as a PDF, which is set to 'expire' within 7 days. By expire I mean that once the time period has passed it will be deleted. If the PDF were to contain sensitive data, could we be confident of a secure way of implementing such a process?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
kafka
  • 553
  • 6
  • 19
  • 1
    Even if you could, how would you stop people creating a copy? – stuartd Jul 03 '12 at 15:57
  • These people have access to the sensitive information anyway, if they really wanted to do some mischief they could. from our perspective we don't want our program to leave sensitive information on the machine, if we can help it. – kafka Jul 03 '12 at 15:59
  • In respect to "considering file is available only whilst program is running" below, see my answer [here](http://stackoverflow.com/a/10244490/572743). This will _kind of_ work. I say _kind of_ because deleting a file does not really remove any sensitive data from the disk if it has been written (which you can kind of control, but not fully). You would have to do a security wipe, and in an age of wear-levelling not even that is guaranteed to work. – Damon Jul 03 '12 at 16:03
  • we're fortunate that the software is used in a secure environment anyway - encrypted hard disks, secure encrypted network, machines re-built every few months etc. We just need to be sure that the machine doesn't leave files on there unnecessarily, and won't be needing to do a security wipe - that would be the responsibility of their IT provider. – kafka Jul 03 '12 at 16:12

1 Answers1

1

You cannot create a self-destructing file in and of itself. You would have to create a service that runs x many minutes/hours/days, searches for expired files, and deletes them. See this question for some Windows-based schedulers.

Community
  • 1
  • 1
Igor
  • 33,276
  • 14
  • 79
  • 112
  • One thing we're considering is that the file is available only whilst the program is open. Once the program is closed it will clear out the directory. So as you mention, not a self-destructing file in itself as such. – kafka Jul 03 '12 at 15:58
  • @kafka If that's the case, would you mind providing some code as to how the file is created/stored, and how you plan to delete the directory? Is the file encoded in any special format, or is it just stored as plain text? – Igor Jul 03 '12 at 16:01
  • We're still just tossing around a few ideas GrailsGuy, deciding on what route we go down. I can provide more info further down the line. – kafka Jul 03 '12 at 16:02