docs: add block common exploits and oauth middleware
This commit is contained in:
@@ -18,6 +18,7 @@ Goma Gateway supports :
|
||||
- Authentication middleware
|
||||
- JWT `client authorization based on the result of a request`
|
||||
- Basic-Auth
|
||||
- OAuth
|
||||
- Rate limiting middleware
|
||||
- In-Memory client IP based
|
||||
- Access middleware
|
||||
@@ -133,6 +134,60 @@ middlewares:
|
||||
params:
|
||||
userCountryId: countryId
|
||||
```
|
||||
### OAuth middleware
|
||||
|
||||
Example of Google provider
|
||||
|
||||
```yaml
|
||||
- name: google-oauth
|
||||
type: oauth
|
||||
paths:
|
||||
- /*
|
||||
rule:
|
||||
clientId: xxx
|
||||
clientSecret: xxxx
|
||||
# oauth provider google, gitlab, github, amazon, facebook, custom
|
||||
provider: google # facebook, gitlab, github, amazon
|
||||
redirectUrl: https://example.com/callback/protected
|
||||
#RedirectPath is the PATH to redirect users after authentication, e.g: /my-protected-path/dashboard
|
||||
redirectPath: /dashboard
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/userinfo.email
|
||||
- https://www.googleapis.com/auth/userinfo.profile
|
||||
state: randomStateString
|
||||
jwtSecret: your-strong-jwt-secret | It's optional
|
||||
|
||||
```
|
||||
|
||||
Example of Authentik provider
|
||||
|
||||
```yaml
|
||||
- name: oauth-authentik
|
||||
type: oauth
|
||||
paths:
|
||||
- /protected
|
||||
- /example-of-oauth
|
||||
rule:
|
||||
clientId: xxx
|
||||
clientSecret: xxx
|
||||
# oauth provider google, gitlab, github, amazon, facebook, custom
|
||||
provider: custom
|
||||
endpoint:
|
||||
authUrl: https://authentik.example.com/application/o/authorize/
|
||||
tokenUrl: https://authentik.example.com/application/o/token/
|
||||
userInfoUrl: https://authentik.example.com/application/o/userinfo/
|
||||
redirectUrl: https://example.com/callback
|
||||
#RedirectPath is the PATH to redirect users after authentication, e.g: /my-protected-path/dashboard
|
||||
redirectPath: ''
|
||||
#CookiePath e.g.: /my-protected-path or / || by default is applied on a route path
|
||||
cookiePath: "/"
|
||||
scopes:
|
||||
- email
|
||||
- openid
|
||||
state: randomStateString
|
||||
jwtSecret: your-strong-jwt-secret | It's optional
|
||||
|
||||
```
|
||||
### Access middleware
|
||||
|
||||
Access middleware prevents access to a route or specific route path.
|
||||
|
||||
Reference in New Issue
Block a user