Noob: how can I validate that a CSV came from my source?

Welcome Forums General PowerShell Q&A Noob: how can I validate that a CSV came from my source?

Viewing 2 reply threads
  • Author
    • #273523
      Topics: 4
      Replies: 3
      Points: 67
      Rank: Member

      Hi All,

      I’m quite new to PowerShell, but hey, i’m loving it so far.

      I’m writing a scheduler that runs every 15 minutes and receives commands by reading CSV files that I create in another process and drop into an inbox folder. An example command would be to suspend a user account at a specific time.

      I want to make sure that the CSV was created by one of my processes and isn’t fake. If I can’t do this then using my above example, it could technically be possible for anyone (with permissions) to drop a CSV into the inbox and suspend an account.

      Is there a way that the scheduler can validate the CSV to determine that one of my processes created it?

      Many thanks.

      Michael D


    • #273553
      Topics: 5
      Replies: 249
      Points: 985
      Helping Hand
      Rank: Major Contributor

      A few thoughts on what you can do to solve.  1. Set permissions on the directory/file so only the specific account can write to it. 2. Encrypt the file so only an account with access to the private key can read it.  3.  Create a hash of the file and check to ensure the hash is correct in your script (against a secure location that stores the hash).

    • #273636
      Topics: 13
      Replies: 41
      Points: 283
      Helping Hand
      Rank: Contributor

      I second Mike R’s suggestions.
      You could also consider writing to an Azure Table instead of a CSV file.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.