Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 83426 invoked from network); 11 May 2007 10:22:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 May 2007 10:22:03 -0000 Received: (qmail 26240 invoked by uid 500); 11 May 2007 10:22:03 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 26198 invoked by uid 500); 11 May 2007 10:22:03 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 26187 invoked by uid 99); 11 May 2007 10:22:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2007 03:22:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [212.27.42.30] (HELO smtp4-g19.free.fr) (212.27.42.30) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2007 03:21:56 -0700 Received: from [192.168.0.101] (did75-15-88-160-185-18.fbx.proxad.net [88.160.185.18]) by smtp4-g19.free.fr (Postfix) with ESMTP id 11BF76C017 for ; Fri, 11 May 2007 12:21:35 +0200 (CEST) Message-ID: <464443AE.7040703@apache.org> Date: Fri, 11 May 2007 12:21:34 +0200 From: Emmanuel Bourg User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [Configuration]: Persisting property values securely References: <051020072016.5607.46437DBB0001DAB0000015E72200745672059DA10E039A@comcast.net> In-Reply-To: <051020072016.5607.46437DBB0001DAB0000015E72200745672059DA10E039A@comcast.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org The best would be to put your implementation on the wiki : http://wiki.apache.org/jakarta-commons/Configuration We may implement this feature later but most likely under a different form, something more generic that would work with all configurations. Also worth mentioning, the byte[] properties in an XMLPropertyListConfiguration are saved in base64, you might use this format instead of a PropertiesConfiguration and convert your passwords into byte arrays. Emmanuel Bourg uma_rk@comcast.net a �crit : > I was planning to extend PropertiesConfiguration by adding setPropertySecure() > and getPropertySecure() with an option of specifying the Base64 encoder. > Could I contribute this back to commons? > > Thanks > > /U > -------------- Original message ---------------------- > From: Emmanuel Bourg >> A solution would be to extend an existing configuration and override >> getProperty and addPropertyDirect to decode/encode the value on the fly >> if the key contains 'password'. >> >> Emmanuel Bourg >> >> >> >> uma_rk@comcast.net a �crit : >>> Thanks. Just to confirm: there is no facility by which I could specify >>> my Base64 encoder as a closure (a transformer) to Configuration, so >>> it my plugins are executed in sequence before setValue() as follows? >>> >>> {invoke plugin 1} => {invoke plugin 2} ... => Finally Invoke setValue() >>> >>> Thanks, >>> >>> /U >>> >>> -------------- Original message ---------------------- >>> From: Oliver Heger >>>> uma_rk@comcast.net wrote: >>>>> Is there a way to have Commons PropertyConfiguration encrypt the specified >>>> value >>>>> with a given scheme before it persists them? This is particularly useful for >>>>> persisting passwords (although you could argue that passwords should not be >>>>> persisted in peroperty files). >>>>> >>>>> Do I need to extend commons configuration? >>>>> >>>>> Thanks, >>>>> >>>>> /U >>>>> >>>> Configuration does not provide a means for encrypting properties. I fear >>>> you have to do the encryption yourself and store the encrypted password >>>> (e.g. as a Base64-encoded string) as a property. >>>> >>>> Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org