What is a good name for a database user?

I have a pylons web application and am currently deciding on a good database username. My parameters are the host name, the name of the web application, or the name of the structure used. None of them speak to me.

Is there any convention for naming database users?

+4
source share
3 answers

You can make this specific to your application, as the abbreviation [app abbreviation] _user. Therefore, if your application is called the "Magico Management System", it will be MMS_user. If you have more than one type of user who perform different tasks for your application, you can do MMS_admin. This way you can make it consistent between settings.

Also @middaparka makes a good point, which you can also include in this concept, perhaps [abbreviation of abbreviation] _ [abbreviation of username] _user. Therefore, if you installed the Magico Management System for Shoppers Drug Mart, you may have MMS_SDM_user, as the client sometimes prefers this type of material, and MMS_user can sometimes be unavailable, so it will almost certainly guarantee a unique name for your db scripts that you You may have to prepare before installation.

One of the reverse ways of this approach, I see that it is somewhat guessed, so the potential security risk increases, but it is convenient for you. Thus, a striking balance is important, but you decide to do it. Good question for verbalization.

+2
source

as a rule, this is somewhat insignificant for web applications, which usually have only one database user and save it in the configuration file. I just just use the database name for simplicity.

just make sure you create a good password.

+1
source

The most logical is the name of the web application, possibly with a suffix if several database users with different access levels are required.

However, depending on the purpose of this development, you can attach the above name to the client for whom you are developing a web application.

0
source

Source: https://habr.com/ru/post/1333806/


All Articles