Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Application / Database user management

Application / Database user management

Scheduled Pinned Locked Moved Database
questiondatabasesecurityworkspace
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Koshbert
    wrote on last edited by
    #1

    Hello All, When designing an application, desktop or web, what is the best way to manage users that must access a database? Is it better to have a single group that all users belong to and let the application manage all the security? Or setup different groups with different permissions on the database and then associate users with that and whatever security the database can't manage handle that in the application? Or is there a third way that I am just not seeing?

    Thanks, Koshbert

    D M 2 Replies Last reply
    0
    • K Koshbert

      Hello All, When designing an application, desktop or web, what is the best way to manage users that must access a database? Is it better to have a single group that all users belong to and let the application manage all the security? Or setup different groups with different permissions on the database and then associate users with that and whatever security the database can't manage handle that in the application? Or is there a third way that I am just not seeing?

      Thanks, Koshbert

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      You will get answers for both methods. 1) Create users and handle security in the database 2) Create users in the application and connect with one user to the database. There are pluses and minuses for both situations, however, consider this ... Given a website like Facebook, you can create an account and have some set of permissions. Do you really think it is creating a database user on the backend? Hmmm ... Probably not. The real answer is up to you. You can do it either way. I personally create one user in the database and handle all the security in the application. Good luck. :thumbsup:

      1 Reply Last reply
      0
      • K Koshbert

        Hello All, When designing an application, desktop or web, what is the best way to manage users that must access a database? Is it better to have a single group that all users belong to and let the application manage all the security? Or setup different groups with different permissions on the database and then associate users with that and whatever security the database can't manage handle that in the application? Or is there a third way that I am just not seeing?

        Thanks, Koshbert

        M Offline
        M Offline
        Michael Potter
        wrote on last edited by
        #3

        I agree with David. I usually create users/rights as structures in the database and use one SQL user/password to access the database. I do break this rule when security is a one shot item -> You either have full access or you have zero access. In this case I won't go to the trouble to create user/rights structures and just use standard group security on the database.

        K 2 Replies Last reply
        0
        • M Michael Potter

          I agree with David. I usually create users/rights as structures in the database and use one SQL user/password to access the database. I do break this rule when security is a one shot item -> You either have full access or you have zero access. In this case I won't go to the trouble to create user/rights structures and just use standard group security on the database.

          K Offline
          K Offline
          Koshbert
          wrote on last edited by
          #4

          So then you guys have a table with user ids and a hash for the password that is used for logging into the application and everyone is associated with the one database user id. That makes the database management piece pretty easy. So what is the downside to this approach?

          Thanks, Koshbert

          M 1 Reply Last reply
          0
          • M Michael Potter

            I agree with David. I usually create users/rights as structures in the database and use one SQL user/password to access the database. I do break this rule when security is a one shot item -> You either have full access or you have zero access. In this case I won't go to the trouble to create user/rights structures and just use standard group security on the database.

            K Offline
            K Offline
            Koshbert
            wrote on last edited by
            #5

            Follow up question: For desktop applications how do you keep the single user id / password in sync? Alot of people for good reason want to change the supplied default password so hard coding it would be a bad idea. Is this kind of design pattern covered in a blog, article or book anywhere online?

            Thanks, Koshbert

            M 1 Reply Last reply
            0
            • K Koshbert

              So then you guys have a table with user ids and a hash for the password that is used for logging into the application and everyone is associated with the one database user id. That makes the database management piece pretty easy. So what is the downside to this approach?

              Thanks, Koshbert

              M Offline
              M Offline
              Michael Potter
              wrote on last edited by
              #6

              The only downside is adding development complexity. You need to manage rights in the application which requires the development of objects manage users and thier rights.

              1 Reply Last reply
              0
              • K Koshbert

                Follow up question: For desktop applications how do you keep the single user id / password in sync? Alot of people for good reason want to change the supplied default password so hard coding it would be a bad idea. Is this kind of design pattern covered in a blog, article or book anywhere online?

                Thanks, Koshbert

                M Offline
                M Offline
                Michael Potter
                wrote on last edited by
                #7

                I work in a closed environment and have no applications in third party hands so changing the db password is not an issue. Not sure how I would handle an application at other sites. Even encrypting a connection string would require a hardcoded key somewhere along the line.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups