GithubHelp home page GithubHelp logo

marjanovicbrane / spring-security-jdbc-bcrypt Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 37 KB

SPRING SECURITY with JDBC AUTHENTICATION and AUTHORIZATION using custom login page and BCRYPT algorithm.

Java 100.00%

spring-security-jdbc-bcrypt's Introduction

SPRING SECURITY with JDBC AUTHENTICATION and AUTHORIZATION using custom login page and BCRYPT algorithm

In this project I used Spring Security for JDBC authentication and authorization with custom login page.

1

User can have 3 roles:employee, manager and admin and he also have appropriate endpoint for every role.With appropriate role, only that user can access some additional information and pages on the web app.For example user “john” have only role EMPLOYEE, and he can only access this page.

2

Some users can have more roles, for example user “mary” have two roles EMPLOYEE and MANAGER and only user with role MANAGER can access this additional information and page Leadership Meeting on the web app.

image

4

User susan also have 2 roles EMPLOYEE and ADMIN and only user with role ADMIN can access this additional information and page IT Systems Meeting on the web app.

image

6

If some other user which is not authorized trys to access some additional information and pages, he will get access denied page with message.

image

In this project I used bcrypt algorithm for password encryption, this is one-way encrypted hashing, so the password in the database can never be decrypted.

To protect against CSRF attacks I used additional authentication data/token into all HTML forms.On this way we can prevent evil website to tricks us into executing an action on a web application that you are currently logged in.For each request we have randomly generated token and Spring Security verifies token before processing.I also added logout button, because we want to logout the user from the system, on that way we also removing http session, cookies, etc…

spring-security-jdbc-bcrypt's People

Contributors

marjanovicbrane avatar

Stargazers

Roman avatar Gábor Mihálcz avatar OftenGuy avatar

Watchers

 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.