Web Applications - Separating DB Connections

Discussion in 'Python' started by Burhan, Jun 8, 2011.

  1. Burhan

    Burhan Guest

    Hello Everyone:

    I am trying to find a way to extract and remove database connection
    information (username, password, schema name) from the application
    source. I need to do this because in my organization - for security
    reasons - access to databases is controlled by a separate department;
    and as such, when a solution is deployed to production - the
    authentication credentials for the databases are changed (and not told
    to the development team).

    Currently all development is done in Java and with that they have
    the ability to publish databases as a service in their application
    server; this way users can be granted access to modify the credentials
    to the JDBC data source without having to edit source code of the
    application being deployed. I am looking for something similar in
    Python (short of using Jython).

    Thanks!
     
    Burhan, Jun 8, 2011
    #1
    1. Advertising

  2. A simple way to do this is use fabric for deployment. It allows you to
    upload a file as if it was a template and replaces any placeholder
    strings with values supplied when you upload. The values can be supplied
    either in a config file or interactively when the deployment takes place.

    For my django deployments to a production server I have the database
    connection information in a config file that is separate from the app
    source. The name of the config file is passed on the command line when
    running the deployment.

    See fabric.contrib.files.upload_template on
    http://docs.fabfile.org/en/1.0.1/api/contrib/files.html
    and the --config option on http://docs.fabfile.org/en/1.0.1/usage/fab.html

    Stuart MacKay
    Lisbon, Portugal

    > Hello Everyone:
    >
    > I am trying to find a way to extract and remove database connection
    > information (username, password, schema name) from the application
    > source. I need to do this because in my organization - for security
    > reasons - access to databases is controlled by a separate department;
    > and as such, when a solution is deployed to production - the
    > authentication credentials for the databases are changed (and not told
    > to the development team).
    >
    > Currently all development is done in Java and with that they have
    > the ability to publish databases as a service in their application
    > server; this way users can be granted access to modify the credentials
    > to the JDBC data source without having to edit source code of the
    > application being deployed. I am looking for something similar in
    > Python (short of using Jython).
    >
    > Thanks!
     
    Stuart MacKay, Jun 8, 2011
    #2
    1. Advertising

  3. Burhan

    Burhan Guest

    On Jun 8, 1:22 pm, Stuart MacKay <>
    wrote:
    > A simple way to do this is use fabric for deployment. It allows you to
    > upload a file as if it was a template and replaces any placeholder
    > strings with values supplied when you upload. The values can be supplied
    > either in a config file or interactively when the deployment takes place.


    Unfortunately our servers are Windows so neat tools like fabric (which
    I
    had used before on private projects) is out of the question. I am not
    aware
    of it being using for Windows servers successfully.

    Thanks!
     
    Burhan, Jun 8, 2011
    #3
  4. On Wed, 8 Jun 2011 07:19:14 -0700 (PDT), Burhan
    <> declaimed the following in
    gmane.comp.python.general:

    >
    > Unfortunately our servers are Windows so neat tools like fabric (which


    Use an ODBC DB-API adapter, specifying an externally defined ODBC
    "datasource"? I believe they can be defined including the user/password
    needed to access the referred database.

    Not sure if the OS can set them to be used by ODBC but not readable
    (via an editor) by users.
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
     
    Dennis Lee Bieber, Jun 9, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Davis
    Replies:
    0
    Views:
    740
    John Davis
    Aug 21, 2003
  2. jobs
    Replies:
    2
    Views:
    896
  3. Anil
    Replies:
    1
    Views:
    444
    Jean-Luc David [MS-MVP]
    Jul 31, 2004
  4. John Davis
    Replies:
    0
    Views:
    370
    John Davis
    Aug 21, 2003
  5. Brian Candler
    Replies:
    1
    Views:
    109
Loading...

Share This Page