Git Product home page Git Product logo

globitek-week6's Introduction

Project 6 - Globitek Authentication and Login Throttling

Time spent: X hours spent in total

User Stories

The following required functionality is completed:

1. "staff/users/new.php" and "staff/users/edit.php"

  • Form with inputs for "Password" and "Confirm Password"
  • Strong password requirements text

2. Data validations

  • Returns an error if password or confirm_password are blank.
  • Returns an error if password and confirm_password do not match.
  • Returns an error if password is not at least 12 characters long.
  • Returns an error if password does not meet character requirements.
  • Returns any errors related to other validations already on the user.

3. Saving a user

  • Encrypts the password
  • Stores the password in the database

4. Login page

  • Verify the correct password.
  • Do not create a User Enumeration vulnerability.

5. If a user fails to log in:

  • Record the failed login for the first 5 attempts.
  • Return a "too many failed logins" message after 5 attempts.
  • Future attempts will show the number of minutes remaining in the lockout.
  • After the lockout period, the failed logins count resets to 0.

6. After any successful login:

  • Set the failed_logins.count for the username to 0.

7. SQLi and XSS

  • Do not introduce any SQLI Injection and Cross-Site Scripting vulnerabilities.

The following advanced user stories are optional:

  • Bonus Objective 1.

    • Identify the subtle Username Enumeration weakness. Include a short description of how the code could be modified to be more secure below:
  • Bonus Objective 2.

    • User password validations only run when the password is not blank.
    • update_user only encrypts and updates the password when the password is not blank.
  • Bonus Objective 3.

    • Create a new user using cost 10.
    • Set bcrypt "cost" parameter to 11 (for both insert and update).
    • Try to login with the "cost 10" user.
    • Briefly describe why login still works even after the cost is changed:
  • Bonus Objective 4.

    • Add "Previous password" to "public/staff/users/edit.php"
    • Validate the previous password before allowing the password to be updated.
    • Require previous password only if new password is being updated (if also completing Bonus Objective 2).
  • Advanced Objective 1.

    • Implement password_hash() on your own as my_password_hash().
    • Implement password_verify() on your own as my_password_verify().
  • Advanced Objective 2.

    • Write generate_strong_password()
    • Add a suggestion for a 12-character strong password to the new and edit user pages.

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with LiceCap.

Notes

Describe any challenges encountered while building the app.

License

Copyright [2017] [William Huang]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

globitek-week6's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.