commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [Configuration]: Persisting property values securely
Date Fri, 11 May 2007 10:21:34 GMT
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 <ebourg@apache.org>
>> 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 <oliver.heger@oliver-heger.de>
>>>> 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


Mime
View raw message