Code Monkey home page Code Monkey logo

session-management-system's Introduction

Session-Management-System

Security authentication and session management system for a servlet/JSP application created from scratch without using exisiting frameworks.
Session management system sets cookies. Cookie timeouts are also set. Ideally there should be a complex logic to set cookie values for the session tracking so it won't collide with any other request. There is no method to remove the cookie so maximum age was set to 0 so that it will be removed from the client browser immediately.
Session ID in this application is set so we can see that it not descriptive in any way, it is long enough to prevent brute force attacks, it is entirely unpredictable and it's value is entirely meaningless.
The LoginServlet servlet will create the session and set the attributes that we can use in other resources or in future requests. When a JSP resource is used, a container automatically creates a session for it. Therefore, we can't check if the session is null to make sure if the user has come through the login page. So in order to validate this request we are using the session attribute.

Logging in as Admin

Password and username are predifined (for the sake of the project) to “password123” and “adminCE4208” respectively. If this application needed the user to create accounts the password would have to be securely choosen. There should be at least one lower case (a-z), upper case (A-Z) and numeric (0-9) character. The password should also be greater than 10 characters and smaller that 128 charters in size.

session-management-system'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.