levelsixsecurity

🤐 An app where a user can sign up and write messages anonymously. Used OAuth2 security to authorize the user using passport.js. Used EJS, node.js, express.js to develop the app and MongoDB as the database. Further used HTML5, CSS3 and JavaScript

View on GitHub

Level_Six_Security

Authentication & Security!

Welcome to Secrets!

Our mission statement is to introduce and impress organisations with the importance of proper secret management in today’s enviroment, as a leaked password could lead to data breaches with heavy consequences. This has become very significant over the last couple years as more & more workload is being pushed towards the cloud.

mandela-featured-image2

Secret management plays an important role in keeping essential information secure and out of threat actors’ reach.

Input

Once, in the Register page the user will be prompted to register or authenticate themselves with Google,Facebook or GitHub using the OAuth 2.0 API.

Enter your input into the email and password field then follow up by pressing the ‘Register’ button to register to the site. [REMEMBER YOUR_EMAIL + YOUR_PASSWORD]

mandela-featured-image2

Output

The example output will prompt the user to submit a SECRET as follows!

mandela-featured-image2

Enter your new secret into the ‘What’s your secret?’ field and press the button submit as follow… Don’t worry your secret will be securely held until you next login!

mandela-featured-image2

Authenticate Use Cases

If the user wishes to authenticate themselves and authorise the secrets App then they can use Google,Facebook or GitHub to login using the OAuth 2.0 API framework which is showcased in the following use cases.

Use Case One

mandela-featured-image2

User selects Facebook to authenticate themselves and authorise the secrets App which will prompt the user to login, where the app secrets will request the following from the user.

mandela-featured-image2

Use Case Two

mandela-featured-image2

User selects Google to authenticate themselves and authorise the secrets App which will prompt the user to login, where the app secrets will request to view the user profile prior to rendering the secrets page.

share

Use Case Three

mandela-featured-image2

User selects Github to authenticate themselves and authorise the secrets App which will prompt the user to login, where the app secrets will request to view the user profile prior to rendering the secrets page.

share

Security

Security within the Secrets App utilises minimal overhead by using salting, hashing and password management through Auth0.

Level 1 Security - Email & Password

Level 2 Security - Encryption

Level 3 Security - Hashing

Level 4 Security - Salting & Hashing

Level 5 Security - Cookies & Sessions

Level 6 Security - Third Party OAuth2.0

Example grabbed using Robo3T from Database [userDB]

mandela-featured-image2

If you check the example, there is no field for password because passport-local-mongoose plugin created a salt & hash for the provided unique username of ‘test@email.com.’

Theory Vs Best Practise

In theory if a password is kept private and secure, unauthorised access will be prevented.

In practise, is this enough???

As Cybercriminals use rainbow tables of stored potential passwords allowing them to gain access when the correct password is attempted.

Why use the pbkdf2 algorithm?

This node crypto library was selected for securing the users personal information inputed to the Secrets App as the appropriate (independent) platform, where every generated salt is saved which makes rainbow table attacks even harder. The Password-based Key Derivation Function 2 (pbkdf2) prevents password cracking tools from making the best use of GPU’s and this reduces the guess rate from hundreds of thousands of guesses per second, to less than a few tens of thousands of guesses per second.

How to run? || Download the zip file to your downloads directory and extract it.

Useful Resources