jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-1793

Password connection parameters are stored in plain text.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.6.0-RC3
  • Fix Version/s: 2.0.x
  • Component/s: ArcSDE, Configuration, Oracle, PostGIS
  • Labels:
    None
  • Environment:
    Windows XP Pro, SP2. BEA Weblogic Server 9.2, ArcSDE 9.2, deployed geoserver.war exploded, 1.6.0-RC3 initially downloaded and later built from svn co of 1.6.0-RC3.
  • Patch Submitted:
    Yes

Description

When configuring an ArcSDE DataStore, the password connection parameter is stored to the geoserver/data/catalog.xml file in plain text. The XMLConfigWriter.storeDataStore() method should be modified to encrypt any connection parameter with the keyword "password". When passwords are stored encrypted, the XML attribute value should be renamed "encryptedValue" as opposed to "value". The XMLConfigReader should then use the corresponding decryption algorithm to decrypt any "encryptedValue" attributes when reading in connection parameters. Note: this will allow for someone to "bootstrap" GeoServer config by hand-editing the connection parameters in the catalog.xml file and replacing any "encryptedValue" attribute with a "value" attribute and setting it to the proper plain text password. This encryption should only take place if a system property is set with the full path to a jks KeyStore containing a Secret Key used for encrypt/decrypt, otherwise passwords will be stored in plain text and a warning level statement to that effect will be logged.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    GeoServer1.6.0-RC3_NGC_Security_Fixes_SVNPatch.txt
    07/Mar/08 4:23 PM
    20 kB
    Michael Runnals

Issue Links

is superceded by

Improvement - An improvement or enhancement to an existing feature or task. GEOS-4702 Passwords stored in plain text

  • Major - Major loss of function.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Andrea Aime added a comment - 08/Mar/08 3:24 AM

Ah, thanks a lot for the patch. A few comments:

  • all the users passwords in 1.6.x are stored in security/users.properties, and they are in plain text. Given that there is no UI to edit the users.properties, it is not possible to encrypt them. So you can hide the connection params, but you cannot hide the geoserver users ones. Is that acceptable to you?
  • not all password parameters are called "password", in all JDBC datastores it's "passwd", not sure if there are any other variations (the connection param names are part of the GeoTools API, each datastore is free to call connection params what they want). Anyways, I guess this is something I can handle
  • this contribution adds a new file, not sure I can accept it unless you sign the contribution agreement or you release the patch in the public domain (from which I can take it and relicense it to GPL + copyright assignment to TOPP). I'm going to CC the project leader, Chris, to hear what are the legal issues in this matter.

Finally, I really suggest you upgrade from 1.6.0-rc3 to 1.6.2, see: http://blog.geoserver.org/2008/03/07/geoserver-162-upgrade-security-release/

Show
Andrea Aime added a comment - 08/Mar/08 3:24 AM Ah, thanks a lot for the patch. A few comments:
  • all the users passwords in 1.6.x are stored in security/users.properties, and they are in plain text. Given that there is no UI to edit the users.properties, it is not possible to encrypt them. So you can hide the connection params, but you cannot hide the geoserver users ones. Is that acceptable to you?
  • not all password parameters are called "password", in all JDBC datastores it's "passwd", not sure if there are any other variations (the connection param names are part of the GeoTools API, each datastore is free to call connection params what they want). Anyways, I guess this is something I can handle
  • this contribution adds a new file, not sure I can accept it unless you sign the contribution agreement or you release the patch in the public domain (from which I can take it and relicense it to GPL + copyright assignment to TOPP). I'm going to CC the project leader, Chris, to hear what are the legal issues in this matter.
Finally, I really suggest you upgrade from 1.6.0-rc3 to 1.6.2, see: http://blog.geoserver.org/2008/03/07/geoserver-162-upgrade-security-release/
Hide
Permalink
Andrea Aime added a comment - 08/Mar/08 3:26 AM

Chris, you opinion on the legal issues of a patch of this size is needed. Can we accept it as is?

Show
Andrea Aime added a comment - 08/Mar/08 3:26 AM Chris, you opinion on the legal issues of a patch of this size is needed. Can we accept it as is?
Hide
Permalink
Chris Holmes added a comment - 09/Mar/08 3:10 PM

I'd prefer a contributor agreement. But we can accept this as is. It's not super core, like it's easy to rip out out. The main thing is that any one making really core changes that aren't easily revertable in a single commit need contributor agreements, so if it came to anything it would be easy to remove.

Show
Chris Holmes added a comment - 09/Mar/08 3:10 PM I'd prefer a contributor agreement. But we can accept this as is. It's not super core, like it's easy to rip out out. The main thing is that any one making really core changes that aren't easily revertable in a single commit need contributor agreements, so if it came to anything it would be easy to remove.
Hide
Permalink
Michael Runnals added a comment - 10/Mar/08 12:57 PM

Great information Andrea, we will definitely want to go with 1.6.2!
*I pushed up to my management the need for us to "sign the contribution agreement," as I do except that we will need to make future changes.
*I can make the simple change to look also for the "passwd" key used by JDBC when doing the encrypt in the XMLConfigWriter and then attach a new patch file to this issue if you'd like.
*The goeserver users passwords in security/users.properties, those will also need to be encrypted... a new issue/patch for that perhaps?

Show
Michael Runnals added a comment - 10/Mar/08 12:57 PM Great information Andrea, we will definitely want to go with 1.6.2! *I pushed up to my management the need for us to "sign the contribution agreement," as I do except that we will need to make future changes. *I can make the simple change to look also for the "passwd" key used by JDBC when doing the encrypt in the XMLConfigWriter and then attach a new patch file to this issue if you'd like. *The goeserver users passwords in security/users.properties, those will also need to be encrypted... a new issue/patch for that perhaps?
Hide
Permalink
Andrea Aime added a comment - 10/Mar/08 1:02 PM

About the list of names to be encrypted, yeah, you can add passwd as well to this patch (or I can do it when merging the patch).
About the users.properties, yes, a separate issue is probably good. If you need to share part of the patch, make that issue depend on this one.

Show
Andrea Aime added a comment - 10/Mar/08 1:02 PM About the list of names to be encrypted, yeah, you can add passwd as well to this patch (or I can do it when merging the patch). About the users.properties, yes, a separate issue is probably good. If you need to share part of the patch, make that issue depend on this one.
Hide
Permalink
Gabriel Roldán added a comment - 02/May/08 9:31 AM

wonder if instead of guessing on parameter name we should have a specific DataAccessFactory.Param subclass to denote its a password, say DataAccessFactory.Password extends DataAccessFactory.Param

Show
Gabriel Roldán added a comment - 02/May/08 9:31 AM wonder if instead of guessing on parameter name we should have a specific DataAccessFactory.Param subclass to denote its a password, say DataAccessFactory.Password extends DataAccessFactory.Param
Hide
Permalink
Andrea Aime added a comment - 05/May/08 11:48 AM

Gabriel, yes, that would look like a good idea.
Michael, what's the status of your work?

Show
Andrea Aime added a comment - 05/May/08 11:48 AM Gabriel, yes, that would look like a good idea. Michael, what's the status of your work?
Hide
Permalink
Gabriel Roldán added a comment - 03/Sep/08 7:07 PM

We already have the necessary infrastructure in geotools to void heuristically figuring out password parameters. Yet I'm moving the fix version to 1.7.1 since I won't have time to get this in for 1.6.5 and the geotools improvement is on 2.5.x anyway

Show
Gabriel Roldán added a comment - 03/Sep/08 7:07 PM We already have the necessary infrastructure in geotools to void heuristically figuring out password parameters. Yet I'm moving the fix version to 1.7.1 since I won't have time to get this in for 1.6.5 and the geotools improvement is on 2.5.x anyway
Hide
Permalink
Andrea Aime added a comment - 16/Apr/09 3:58 AM

This one has been rescheduled a number of times... pity cause there was a patch attached to it.
Maybe something we should consider for 2.0.x? We are breaking backwards compatibility with the storage format anyways, seems like we could make a custom XStream persister that knows to encrypt passwords if we give it enough metadata to recognize one?

Show
Andrea Aime added a comment - 16/Apr/09 3:58 AM This one has been rescheduled a number of times... pity cause there was a patch attached to it. Maybe something we should consider for 2.0.x? We are breaking backwards compatibility with the storage format anyways, seems like we could make a custom XStream persister that knows to encrypt passwords if we give it enough metadata to recognize one?
Hide
Permalink
Andrea Aime added a comment - 06/May/09 10:01 AM

Just a minor note about the patch, is uses sun.misc.BASE64Decoder and sun.misc.BASE64Encoder, we should use an external replacement for those (commons codecs does have one for example)

Show
Andrea Aime added a comment - 06/May/09 10:01 AM Just a minor note about the patch, is uses sun.misc.BASE64Decoder and sun.misc.BASE64Encoder, we should use an external replacement for those (commons codecs does have one for example)
Hide
Permalink
Gabriel Roldán added a comment - 06/May/09 10:06 AM

Right. Also, my concern is about the need to run java with the location of the keyfile as argument. Surely some people won't be able to do that (websphere, etc)
It seems to me like a contribution to the UI to indicate that will be needed?

Show
Gabriel Roldán added a comment - 06/May/09 10:06 AM Right. Also, my concern is about the need to run java with the location of the keyfile as argument. Surely some people won't be able to do that (websphere, etc) It seems to me like a contribution to the UI to indicate that will be needed?
Hide
Permalink
Andrea Aime added a comment - 04/Dec/09 9:53 AM

catalog.xml is gone but users.properties has the same problem

Show
Andrea Aime added a comment - 04/Dec/09 9:53 AM catalog.xml is gone but users.properties has the same problem

People

  • Assignee:
    Gabriel Roldán
    Reporter:
    Michael Runnals
Vote (0)
Watch (5)

Dates

  • Created:
    07/Mar/08 4:23 PM
    Updated:
    07/Feb/12 3:03 AM
    Resolved:
    07/Feb/12 3:03 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.