Author: rgoers Date: Thu Aug 13 22:53:31 2009 New Revision: 804052 URL: http://svn.apache.org/viewvc?rev=804052&view=rev Log: Document how to encrypt passwords
Modified: commons/proper/vfs/trunk/xdocs/filesystems.xml Modified: commons/proper/vfs/trunk/xdocs/filesystems.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/xdocs/filesystems.xml?rev=804052&r1=804051&r2=804052&view=diff ============================================================================== --- commons/proper/vfs/trunk/xdocs/filesystems.xml (original) +++ commons/proper/vfs/trunk/xdocs/filesystems.xml Thu Aug 13 22:53:31 2009 @@ -5,9 +5,9 @@ The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -90,7 +90,36 @@ <code>file:///somedir/some%25file.txt</code> </li> </ul> - + <p> + Many file systems accept a userid and password as part of the url. However, storing + a password in clear text in a file is usually unacceptable. To help with that + Commons VFS provides a mechanism to encrypt the password. It should be noted though, + that this is not completely secure since the password needs to be unencrypted + before Commons VFS can use it. + </p> + <p> + To create an encrypted password do: + </p> + <code> java -cp commons-vfs-2.0.jar org.apache.commons.vfs.util.EncryptDecrypt encrypt mypassword + </code> + <p> + where <i>mypassword</i> is the password you want to encrypt. The result of this will be a + single line of output containing uppercase hex characters. For example, + </p> + <code> + java -cp commons-vfs-2.0.jar org.apache.commons.vfs.util.EncryptDecrypt encrypt WontUBee9 + D7B82198B272F5C93790FEB38A73C7B8 + </code> + <p> + Then cut the output returned and paste it into the URL as: + </p> + <code> + https://testuser:{d7b82198b272f5c93790feb38a73c7...@myhost.com/svn/repos/vfstest/trunk + </code> + <p> + VFS treats a password enclosed in {} as being encrypted and will decrypt the password + before using it. + </p> </section> <section name="Local Files"> @@ -522,13 +551,13 @@ </li> </ul> </section> - + <section name="mime"> <p> This filesystem can read mails and its attachements like archives.<br /> If a part in the parsed mail has no name, a dummy name will be generated. - The dummy name is: _body_part_X where X will be replaced by the part number. + The dummy name is: _body_part_X where X will be replaced by the part number. </p> <p>