PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Password encryption reencrypts strings multiple times #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use a connector type that uses password encryption to encrypt a "Password" 
property.
2. Create a new connector instance.
3. Note the encrypted password in the connector properties file.
4. Edit the connector instance, and click Save Configuration.
5. Note the encrypted password in the updated properties file.

What is the expected output? What do you see instead?

Each time the Edit Connector page is loaded and saved, the password is 
reencrypted without 
being decrypted.

What version of the product are you using? On what operating system?

Connector Manager revision 668.

Please provide any additional information below.

The "Password" property is not decrypted in the Maps passed to the 
getPopulatedConfigForm and 
validateConfig methods in ConnectorType. When the password is then encoded in 
the form 
snippet, it is encrypted, but since the user may have typed in a new password, 
the Connector 
Manager always encrypts the password from the form before persisting the 
properties.

When this is fixed, care has to be taken to account for the as yet 
unimplemented 
ConnectorFactory. In that case, we want the Password property passed to 
validateConfig to be 
unencrypted, but what about the Password passed to makeConnector? Either the 
Password needs 
to be decrypted by something other than the 
PropertyPlaceholderConfigurer.convertProperties 
method, or the property passed to makeConnector needs to encrypted, either by 
the caller or, 
preferrably, by the method itself. That's a little silly, since we're about to 
decrypt it in that case. 
Whatever the solution, there are lots of combinations of code paths to think 
about.

Original issue reported on code.google.com by jl1615@gmail.com on 27 Sep 2007 at 5:23

GoogleCodeExporter commented 8 years ago
Fixed r684

Original comment by mgron...@gmail.com on 4 Oct 2007 at 12:53