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

Contribute

You can use the following Gitpod to get started on contributing really quickly ;)

Open in Gitpod

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>2.6.7</version>
</dependency>

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

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

As of version 1.2.0, we are adding alternative RickRoll videos. These can be selected by setting the rickroll.version=VERSION_NAME property.

Available versions:

VERSION_NAME URL
original https://www.youtube.com/watch?v=dQw4w9WgXcQ
scary-pockets https://www.youtube.com/watch?v=sQnoZUR6fvY

Since version 1.3.0, it's possible to use patterns as path configurations. Patterns give more flexibility and help to reduce the total amount of configured paths.
Request URIs will be checked on a match using an AntPathMatcher.

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. We are allowing PRs to add alternative URLs. These will be validated by us before being added to available options.

Special Thanks

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

Contributors

martinvisser avatar mthmulders avatar odrotbohm avatar renovate-bot avatar tomcools avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • Update dependency org.apache.maven.plugins:maven-release-plugin to v2.5.3
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.10.1

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
pom.xml
  • org.springframework.boot:spring-boot-starter-parent 2.6.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • org.apache.maven.plugins:maven-release-plugin 2.5.2
  • org.sonatype.plugins:nexus-staging-maven-plugin 1.6.13
  • org.apache.maven.plugins:maven-gpg-plugin 1.6
  • org.apache.maven.plugins:maven-source-plugin 2.2.1
  • org.apache.maven.plugins:maven-javadoc-plugin 2.9.1

Filter checks on request URI equality

I love this feature, but it lacks a bit of flexibility I think.

To avoid having too many path values to check for equality it would be nice if the filter uses a path matcher to see if the request URI matches a configured path.

I get some requests on my site which I would like to rickroll like these:

  • /shop/wp-includes/wlwmanifest.xml
  • /site/wp-includes/wlwmanifest.xml
  • /sito/wp-includes/wlwmanifest.xml
  • /2018/wp-includes/wlwmanifest.xml
  • /2019/wp-includes/wlwmanifest.xml

I don't want to filter on extension .xml, but I do want to rickroll these request. So it would be nice if /**/wp-includes/** would be an option. I believe it could just extend on the current functionality, because an AntPathMatcher would still work like an equals check too.

I'm willing to create a PR myself.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate Limited

These updates are currently rate limited. Click on a checkbox below to force their creation now.

  • Update dependency org.springframework.boot:spring-boot-starter-parent to v2.7.3
  • Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v3

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v2.10.4
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v2.4

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
pom.xml
  • org.springframework.boot:spring-boot-starter-parent 2.6.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • org.apache.maven.plugins:maven-release-plugin 2.5.2
  • org.sonatype.plugins:nexus-staging-maven-plugin 1.6.13
  • org.apache.maven.plugins:maven-gpg-plugin 1.6
  • org.apache.maven.plugins:maven-source-plugin 2.2.1
  • org.apache.maven.plugins:maven-javadoc-plugin 2.9.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.