Labels

All (5) Scripting (2) how-to (2) infopath (2) powershell (2) ps1 (2) Building (1) IIS (1) Visual Studio (1) cloud drive (1) common targets (1) encryption (1) hosts file (1) migration (1) msbuild (1) pifix (1) sharepoint (1)
Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

2012-04-27

Using encfs4win for encrypted storage on cloud drive

1. Get and install the software

  1. Go to http://members.ferrara.linux.it/freddy77/encfs.html and download encfs.zip
  2. Download Dokan (there is a link on the first download page). Install Dokan. Dokan is a user mode file system, like FUSE for linux.
  3. Unzip encfs (there is no installer) and copy the exe-files to a folder of your choice, e.g. C:\usr\bin

2. Run the encfs windows application

Note: This is the simple way. You can do a lot more by using the command line options.

  1. Open Windows Explorer. 
  2. Go to where you put the binaries (C:\usr\bin).  
  3. Right-click on encfsw.exe. Choose "Run as administrator". 
  4. You will get a key in the system tray area

3. Set encrypted storage folder

  1. Create a folder where you want to put your encrypted files. In this case, I call the folder for my new drive "Test" under "Vault\fs" inside my cloud drive area. Typical values for my scenario:
       C:\users\username\Google Drive\Vault\fs\Test
       C:\users\username\Dropbox\Vault\fs\Test
  2. Click on the key icon in the sys tray. Click Open/Create. Select the Test folder in the encfsw dialog. Select the drive letter, e.g. "X:". Supply the password and confirm it.

4. Mount the disk

  1. Click on the key in the system tray. Select the folder you want to mount, e.g.
       C:\users\username\Google Drive\Vault\fs\Test
  2. Select the drive you want to mount it to, e.g. "X:". This is where your files will be in their decrypted form. Supply the password you set earlier. Your encrypted X:-drive should show up.

Issues

As of now, it seems that most documentation is in pre-alpha, so you have to do some searching yourself to find good examples. Especially on how to use the command line. I will update this post later.

You won't get much in way of feedback when something goes wrong. Try to run encfsw.exe without admin privileges and see for yourself. To go for something more mature, you can also opt for the payware version of encfs from BoxCryptor in Germany.

Thanks


  • Frediano Ziglio for porting encfs, See http://gitorious.org/encfs4win
  • And all contributors to the mother project and the port
  • Oliver Heller that wrote the blog post that made it work for me

Warning


The software used in this guide is newly developed and perhaps not in a production quality setting. I take no responsibility for whatever happens to your files. I'm still going to have other backups using more mature technology.

As with all crypto-software, you have to trust those who wrote it, or make the effort of validating their code and  algorithms.



2011-05-11

Upgrading Infopath forms and version on Sharepoint

This is an off-topic log entry, but I guess most .net developers also are, or will be, familiar with SharePoint, whether they want it or not. We are currently working on migrating from a set of documents (InfoPath form xml files) edited on a SP 2003 server with a locally installed Infopath 2007 form template to a set of documents in a SharePoint 2010 Form library where the template will be stored inside the form library.

We tried a number of different approaches, but it failed when it came to how to tell the old documents that they should use the new form in the library. An entry on the InfoPath blog gave a lot of valuable information. The re-linking alternative didn't work as expected, so we turned to the the PIFix-alternative. That was a success.

I'm not sure why re-linking failed, my guess is that it failed because our old documents were using an installed schema, so they weren't pointing to any template URL. Perhaps SharePoint should support that scenario? It might also be unrelated, but I didn't spend more time finding out the cause.

To migrate the forms, we have done the following steps:
  1. Use InfoPath 2010 to open the 2007 .xsn file and convert it.
  2. Update the forms submit options so that when user submits, it ends up in the new library.
  3. Set versioning information the way we want it (we use a yyyy.m.d.n scheme to make it simple).
  4. Publish the form to the new forms library.
  5. Create a "dummy" test file with the "+ Add document" button in the forms library.
  6. Open that dummy file with a notepad application and note the version and product version info as well as the url to the template inside the forms library (it ends with /Forms/template.xsn)
  7. Map a drive on our computer to the form library.
  8. Install InfoPath 2003 sdk, you can find the link in the blog article referenced above.
  9. Open a command prompt and go to the forms library.
  10. Run PIFix tool from InfoPath 2003 SDK as described below.
And voila, the forms are now using the form template for the folder.

Here is a detailed example on how to run PIFix. /v is for the template version and /prv is for product version, the lowest version of InfoPath you support for this form. For InfoPath 2010, this value is 14.0.0, if you set it, you cannot open it in an old version of InfoPath anymore. The /url parameter sets where the document will look for its template. All these values can be extracted from the dummy-file we created in the steps above. I've used Windows Explorer to map \\sharepointserver\sites\mysite\my form library\ to Z: before I start doing anything on the command prompt.