How to Securely Store Various Credentials?

Wulfa

Background: I am working on an application (for a school project) that will essentially become a network asset management and remediation tool. It will scan the network for devices, gather information about them and do some other things not relevant to the question. One feature it would have is allowing the user to provide login credentials for the various networking devices so that the application can then login to those devices so it may gather more information, and later on, allow for changes to be made.

My Question: How am I able to securely store those provided credentials. Currently the back-end will consist of a PostgreSQL database (which will contain the scan data) but I am not sure if it is safe to store them there or how I am supposed to approach the problem of storing them securely so that they may be used later on.

P.S.: Let me know if you need any additional info, I am new to using stack overflow so I am not sure if I have provided enough detail. Thank you.

Vao Tsun

https://www.postgresql.org/docs/current/static/pgcrypto.html docs are pretty concrete with examples. Create extension once per db:

t=# create extension pgcrypto;
CREATE EXTENSION

Let's say password is Ирландия, then using random salt:

t=# select crypt('Ирландия', gen_salt('md5'));
               crypt
------------------------------------
 $1$gMymr.0W$axxTHvfmsNRDkepNAMNsT1
(1 row)

or:

t=# select crypt('Ирландия', gen_salt('md5'));
               crypt
------------------------------------
 $1$wjJDa4Np$M7XqQIrgnfpAf.CLtrpkv1
(1 row)

different results each time, so take ANY of those to check if password is right, eg:

t=# select crypt('Ирландия', '$1$gMymr.0W$axxTHvfmsNRDkepNAMNsT1') = '$1$gMymr.0W$axxTHvfmsNRDkepNAMNsT1' as match;
 match
-------
 t
(1 row)

and wrong:

t=# select crypt('ИрландияNOT', '$1$gMymr.0W$axxTHvfmsNRDkepNAMNsT1') = '$1$gMymr.0W$axxTHvfmsNRDkepNAMNsT1' as match;
 match
-------
 f
(1 row)

the arguments for above functions are in section F.26.2. Password Hashing Functions

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to store FTP credentials securely in C# application?

From Dev

How to securely store external auth credentials in google app engine

From Dev

How do you configure Netplan on Ubuntu to store 802.1x credentials securely?

From Dev

How to securely implement FTP credentials into an android app?

From Dev

How to store password in angularjs securely

From Dev

Where to securely store Web API credentials in iPhone app?

From Dev

How to securely store user passwords in a Cloudant DB?

From Dev

How to store data securely on a mobile device?

From Dev

How to store a json data securely in phonegap android?

From Dev

How to store a password as securely in Chrome Extension?

From Dev

how to securely store encryption keys in android?

From Dev

How to securely store Google Authenticator secret key?

From Dev

How to store samba (cifs) password securely?

From Dev

How to securely store passwords in a configuration file on Linux?

From Dev

How to securely store AWS service ids for iOS?

From Dev

How to securely authenticate AD user in Powershell (encrypt credentials)

From Dev

How to send my Credentials securely using smtpClient with ASP.Net

From Dev

How can credentials be securely distributed in a cloud computing environment?

From Dev

How to NOT store credentials for WPA enterprise?

From Dev

How to store user credentials for script

From Dev

How to NOT store credentials for WPA enterprise?

From Dev

How to store user credentials for script

From Dev

IBM Worklight. Is it possible to store user credentials securely and recover them without user interacton?

From Dev

In Eve, how can you store the user's password securely?

From Dev

RESTful API: how to securely store bearer API tokens?

From Dev

How Can I Use the Android KeyStore to securely store arbitrary strings?

From Dev

How can I store password securely in MySQL and authenticate to external services

From Dev

How to more securely store login information for my application?

From Dev

How to securely send/store password in a Spring RESTful login service

Related Related

  1. 1

    How to store FTP credentials securely in C# application?

  2. 2

    How to securely store external auth credentials in google app engine

  3. 3

    How do you configure Netplan on Ubuntu to store 802.1x credentials securely?

  4. 4

    How to securely implement FTP credentials into an android app?

  5. 5

    How to store password in angularjs securely

  6. 6

    Where to securely store Web API credentials in iPhone app?

  7. 7

    How to securely store user passwords in a Cloudant DB?

  8. 8

    How to store data securely on a mobile device?

  9. 9

    How to store a json data securely in phonegap android?

  10. 10

    How to store a password as securely in Chrome Extension?

  11. 11

    how to securely store encryption keys in android?

  12. 12

    How to securely store Google Authenticator secret key?

  13. 13

    How to store samba (cifs) password securely?

  14. 14

    How to securely store passwords in a configuration file on Linux?

  15. 15

    How to securely store AWS service ids for iOS?

  16. 16

    How to securely authenticate AD user in Powershell (encrypt credentials)

  17. 17

    How to send my Credentials securely using smtpClient with ASP.Net

  18. 18

    How can credentials be securely distributed in a cloud computing environment?

  19. 19

    How to NOT store credentials for WPA enterprise?

  20. 20

    How to store user credentials for script

  21. 21

    How to NOT store credentials for WPA enterprise?

  22. 22

    How to store user credentials for script

  23. 23

    IBM Worklight. Is it possible to store user credentials securely and recover them without user interacton?

  24. 24

    In Eve, how can you store the user's password securely?

  25. 25

    RESTful API: how to securely store bearer API tokens?

  26. 26

    How Can I Use the Android KeyStore to securely store arbitrary strings?

  27. 27

    How can I store password securely in MySQL and authenticate to external services

  28. 28

    How to more securely store login information for my application?

  29. 29

    How to securely send/store password in a Spring RESTful login service

HotTag

Archive