课程: Programming Foundations: Web Security

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Keep credentials private

Keep credentials private

- When we think of credentials, we usually think of usernames and passwords, and website code often uses credentials to connect to databases, to connect to a payment processor, to access third party APIs, or connect to source code repositories. These credentials are valuable access keys that need to be handled securely. Don't put credentials directly inside your code. We call that hard coding the credentials. Instead, store the credentials in a separate file and use variables or even better constants to refer to the values. Separating configuration from the code is considered a best practice. It's also more secure. These values are still in the project, but it's easier to give special treatment to a separate credentials file. Version control systems such as Git, SVN, and Mercurial present unique challenges for credentials. These code management tools are often used to distribute code via shared repositories or third…

内容