Security issues for managing connection information directories

Asked 2 years ago, Updated 2 years ago, 104 views

'connection': {
        'host': 'localhost',
        'port': '3306',
        'user': 'root',
        'password': 'admin',
        'database': 'test'
    }

Developing a node.js environment web app.

I am using mysql in conjunction with it, but how should I handle the above connection information?

Is there any security problem if I just manage it under the name config.js, etc. in the web directory?

Please answer the above issues and methods!!!

Have a nice weekend!

node.js security hacking

2022-09-22 21:37

1 Answers

If you are exposed to a single source, such as development equipment, servers, and source storage, information that can access the DB will be exposed immediately.

Rather than simply saving passwords to a file, we recommend storing them in system variables on the server and reading them.

This prevents exposure to sources.


2022-09-22 21:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.