Giter Club home page Giter Club logo

daggerok / csrf-spring-webflux-mustache Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 5.0 137 KB

This repository is contains example application using spring boot 2.0, webflux, spring security 5, reactive mongodb and mustache template engine: spring security 5, CSRF protection with mustache, spring webflux functional routes security, method security, authorization decision, etc

Java 73.63% CSS 3.03% HTML 23.34%
spring-webflux spring-web spring-boot spring-mvc mustache mongodb reactive reactive-programming csrf csrf-protection

csrf-spring-webflux-mustache's Introduction

reactive security Build Status

This repository is contains example application using spring boot 2.0, webflux, spring security 5, reactive mongodb and mustache template engine

maven
./mvnw clean spring-boot:run
gradle
./gradlew clean bootRun
test
open http://127.0.0.1:8080
# user / user
# adin / admin

http get :8080/api/v1/users
# 401: Unauthorized

http --auth user:user get :8080/api/v1/users
# 403 Forbidden: Access Denied

http -a admin:admin get :8080/api/v1/users accept:'text/html'
# OK
Note
for details, see repository branches
  1. csrf protection, no op password encoder (done in csrf branch)

  2. mongo userDetailService, standart password encoder (done here)

  3. share mongodb publisher, use project user authentication principal (done in that branch)

  4. encode password (cpu costs) in separate thread (see IndexPage.java)

  5. fix deprecated password encoder for support passwords migrations (done SecurityConfig.java)

  6. password-hash upgrade strategy on authentication (done here)

  7. pathMatches by role (done SecurityConfig.java)

  8. pathMatches access authorization decision (done SecurityConfig.java and SecurityConfig.java)

  9. method security (see UserRepository.java and SecurityConfig.java)

  10. webflux functional routes API security (see UserRoutes.java)

  11. oauth2, spring-cloud (todo)

  12. authorization-server, resource-server, jwt…​ (todo)

help resources:

csrf-spring-webflux-mustache's People

Contributors

daggerok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.