Code Monkey home page Code Monkey logo

rickroll-security-spring-boot-starter's Introduction

Rickroll Security Spring Boot Starter

This starter will reroute configured paths and/or file extensions to a video of Rick Astley - Never Gonna Give You Up.

Demo

Example Use Case

Noob hackers often try to access secure pages. The Spring Actuator endpoints are an example where a hacker could do some serious damage. You could put a password on it and you definatly should...but then they don't learn anything. So what you can do is move the actual actuator paths and replace them with Rick Astley! That'll make them think twice!

management.endpoints.web.base-path=/manage
rickroll.paths=/actuator

Some might even try to reach common PHP pages, such as "/wp-admin/install.php". If you serve no PHP, you can even redirect all requests for PHP pages (or another extension of your choice) to Rick!

rickroll.file-extensions=php

Configuration

Add the following dependency to your POM.

<dependency>
    <groupId>be.tomcools</groupId>
    <artifactId>rickroll-security-spring-boot-starter</artifactId>
    <version>1.1.0</version>
</dependency>

Paths you want to redirect can be configured in your Spring Application Properties:

rickroll.paths=/admin,/tomcools
rickroll.file-extensions=php

FAQ

If I have a RestController mapped to /admin and I also add /admin in the rickroll.paths. What will happen?

Why don't you try that for yourself? #evillaugh

The implementation is based on a Filter.class. So anything that happens after the filter will be replaced by some nice music. In case of a RestController, since this comes after the Filter...you will be rickroll'd.

Why did you hardcode the Rickroll URL?

Let's face it. That video will only be removed from the internet in case of an apocalyptic event. In which case, this project won't matter much either.

More serious note: If the request comes to redirect to other URLs, I'll consider making it configurable.

Special Thanks

rickroll-security-spring-boot-starter's People

Contributors

tomcools avatar

Forkers

discodice

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.