**Home Page: [usthe.com/sureness](https://usthe.com/sureness) or [su.usthe.com](https://su.usthe.com/)**
## Background
## 📫 Background
In the mainstream web architecture, how to protect the restful api provided by the back-end through effective and fast authentication has become particularly important.
For existing frameworks, whether it is apache shiro which does not natively support rest, or deeply bound spring, the slower performance and steep learning curve of spring security are not our ideal framework.
Ever since sureness was born, we hope to solve these, provide a **restful api**, **no framework dependency**, can **dynamically modify permissions**, **multiple authentication policies**, **faster**, **easy to use and extend** security framework.
## <font color="green">`Introduction`</font>
## 🎡 <font color="green">Introduction</font>
> Sureness is a new, permission project which we learn from apache shiro and add some ideas to create it.
...
...
@@ -35,7 +35,7 @@ Ever since sureness was born, we hope to solve these, provide a **restful api**,
> The low configuration of sureness, easy to expand, and not coupled with other frameworks, enables developers to quickly and safely protect their projects in multiple scenarios.
##### Compare
##### 🔍 Compare
| ~ | sureness | shiro | spring security |
| --- | --- | --- | --- |
...
...
@@ -49,7 +49,7 @@ Ever since sureness was born, we hope to solve these, provide a **restful api**,
| **performance** | fast | slower | slower|
| **learning curve** | simple | simple | steep|
##### Benchmark
##### 📈 Benchmark
![benchmark](docs/_images/benchmark_en.png)
...
...
@@ -59,7 +59,7 @@ Ever since sureness was born, we hope to solve these, provide a **restful api**,
Detail see [Benchmark Test](https://github.com/tomsun28/sureness-shiro-spring-security-benchmark)
#### Use the Default Configuration to Configure Sureness
#### 🐵 Use the Default Configuration to Configure Sureness
The default configuration -`DefaultSurenessConfig` uses the document datasource `sureness.yml` as the auth datasource.
It supports jwt, basic auth, digest auth authentication.
...
...
@@ -106,7 +106,7 @@ public DefaultSurenessConfig surenessConfig() {
}
```
#### Load Auth Config DataSource
#### 🐮 Load Auth Config DataSource
Sureness authentication requires us to provide our own account data, role permission data, etc. These data may come from text, relational databases, non-relational databases, annotations, etc.
We provide interfaces `SurenessAccountProvider`, `PathTreeProvider` for user implement to load data from the dataSource where they want.
...
...
@@ -121,7 +121,7 @@ If the configuration resource data comes from text, please refer to [Sureness i
If the configuration resource data comes from dataBase, please refer to [Sureness integration springboot sample(database scheme)](https://github.com/tomsun28/sureness/tree/master/sample-tom)
#### Add an Interceptor Intercepting All Requests
#### 🐐 Add an Interceptor Intercepting All Requests
The essence of sureness is to intercept all rest requests for authenticating and Authorizing.
The interceptor can be a filter or a spring interceptor, it intercepts all request to check them.
...
...
@@ -129,7 +129,7 @@ The interceptor can be a filter or a spring interceptor, it intercepts all reque
Sureness supports custom subject, custom subjectCreator, custom processor and more.
...
...
@@ -180,7 +180,7 @@ Sureness provides the following common interfaces as extension points:
Refer to [Extension Point](https://usthe.com/sureness/#/extend-point) for the extended documentation.
1.**Custom Subject**
1.🥊 **Custom Subject**
`Implment Subject, add custom subject content`
`Implment SubjectCreate to create custom subject`
...
...
@@ -188,20 +188,20 @@ Refer to [Extension Point](https://usthe.com/sureness/#/extend-point) for the ex
See [Custom Subject](docs/custom-subject.md)
2.**Custom SubjectCreator**
2.🔫 **Custom SubjectCreator**
`Implment SubjectCreate to create your custom subject`
See [Custom SubjectCreator](docs/custom-subject-creator.md)
3.**Custom Processor**
3.🪓 **Custom Processor**
`A subject also can support by different processor, so we can custom processor to support custom subject`
`Implment Processor, set which subject can support and implment processing details`
See [Custom Processor](docs/custom-processor.md)
4.**Custom Datasource**
4.🏹 **Custom Datasource**
`Implment PathTreeProvider, load in DefaultPathRoleMatcher`
`Implment SurenessAccountProvide, load in processor`
...
...
@@ -210,7 +210,7 @@ See [Custom Datasource](docs/custom-datasource.md)
Detail please refer to [Sureness integration springboot sample(database scheme)](sample-tom)
## Contributing
## 🙋 Contributing
Very welcome to Contribute this project, go further and better with sureness. If you have any questions or suggestions about the project code, please contact @tomsun28 directly.
...
...
@@ -221,10 +221,10 @@ Components of Repository:
-[sample projects using sureness in each framework(javalin,ktor,quarkus)--samples](samples)
In the mainstream web architecture, how to protect the restful api provided by the back-end through effective and fast authentication has become particularly important.
For existing frameworks, whether it is apache shiro which does not natively support rest, or deeply bound spring, the slower performance and steep learning curve of spring security are not our ideal framework.
Ever since sureness was born, we hope to solve these, provide a **restful api**, **no framework dependency**, can **dynamically modify permissions**, **multiple authentication policies**, **faster**, **easy to use and extend** security framework.
## 🎡 <font color="green">Introduction</font>
> Sureness is a new, permission project which we learn from apache shiro and add some ideas to create it.
> Authentication for restful api, based on RBAC, mainly focused on the protection of restful api.
...
...
@@ -27,7 +32,7 @@
> The low configuration of sureness, easy to expand, and not coupled with other frameworks, enables developers to quickly and safely protect their projects in multiple scenarios.
##### Compare
##### 🔍 Compare
| ~ | sureness | shiro | spring security |
| --- | --- | --- | --- |
...
...
@@ -41,7 +46,7 @@
| **performance** | fast | slower | slower|
| **learning curve** | simple | simple | steep|
##### Benchmark
##### 📈 Benchmark
![benchmark](_images/benchmark_en.png)
...
...
@@ -51,7 +56,7 @@
Detail see [Benchmark Test](https://github.com/tomsun28/sureness-shiro-spring-security)