5
.github/workflows/go.yml
vendored
5
.github/workflows/go.yml
vendored
@@ -1,11 +1,8 @@
|
|||||||
# This workflow will build a golang project
|
|
||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
|
||||||
|
|
||||||
name: Go
|
name: Go
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main","develop" ]
|
branches: [ "*" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
|||||||
40
CONTRIBUTING.md
Normal file
40
CONTRIBUTING.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Contributing to Goma Gateway
|
||||||
|
|
||||||
|
Welcome to Goma Gateway! This document shall serve as a guide for you to follow in your journey to contributing to this project.
|
||||||
|
There are many ways to contribute to Goma Gateway:
|
||||||
|
- Reporting Bugs
|
||||||
|
- Resolving issues
|
||||||
|
- Sharing an idea and working on it
|
||||||
|
- Working on a feature with other contributors.
|
||||||
|
- And More…
|
||||||
|
|
||||||
|
To get started, take a look at the following sections.
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
### Did you spot a problem in Goma Gateway?
|
||||||
|
|
||||||
|
Firstly you should check if such an issue was previously opened/closed for your problem on the repository. If it doesn't then you should create a new issue.
|
||||||
|
|
||||||
|
### Do you want to solve an issue?
|
||||||
|
|
||||||
|
If there is an issue you think you can solve, and want to solve, then you should create a new fork of this repository.
|
||||||
|
In that repository you should create a new branch for the issue you are working on and commit changes there.
|
||||||
|
When the issue is solved, and you want it to be integrated into the official repository, you may create a pull request for the same.
|
||||||
|
The description of the pull request should clearly describe both the issue and the solution along with other necessary information.
|
||||||
|
The developers will merge after making the necessary changes (if arises a need to do so).
|
||||||
|
|
||||||
|
|
||||||
|
### Do you want to share an idea?
|
||||||
|
|
||||||
|
Goma Gateway welcomes new ideas. If you have an idea you should first check if a similar or identical idea was presented previously or not, or check thoroughly if the idea is already present in Goma Gateway.
|
||||||
|
To share your idea you can open an issue.
|
||||||
|
There you can share your idea and if you want to work on it, you can follow the same steps as mentioned in previously.
|
||||||
|
|
||||||
|
### Do you want to contribute but don't know how?
|
||||||
|
|
||||||
|
Your first resource in this should be https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project
|
||||||
|
This file serves as your guide specifically for this project to help you get your contributions into the project.
|
||||||
|
If you still have some questions or need help, feel free to open a discussion on the same.
|
||||||
|
|
||||||
|
# Thank You 🙏
|
||||||
10
README.md
10
README.md
@@ -112,10 +112,16 @@ services:
|
|||||||
- ./config:/etc/goma/
|
- ./config:/etc/goma/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Supported Systems
|
||||||
|
|
||||||
## Requirement
|
- [x] Linux
|
||||||
|
- [x] MacOS
|
||||||
|
- [x] Windows
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
- Docker
|
- Docker
|
||||||
|
- Kubernetes
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -126,6 +132,8 @@ The Goma Gateway project welcomes all contributors. We appreciate your help!
|
|||||||
|
|
||||||
If you like or are using Goma Gateway, please give it a star. Thanks!
|
If you like or are using Goma Gateway, please give it a star. Thanks!
|
||||||
|
|
||||||
|
Please share.
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ services:
|
|||||||
start_period: 20s
|
start_period: 20s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
ports:
|
ports:
|
||||||
- "80:8080"
|
- "8080:8080"
|
||||||
- "443:8443"
|
- "8443:8443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/etc/goma/
|
- ./:/etc/goma/
|
||||||
|
|||||||
@@ -4,20 +4,21 @@ metadata:
|
|||||||
name: goma-config
|
name: goma-config
|
||||||
data:
|
data:
|
||||||
goma.yml: |
|
goma.yml: |
|
||||||
# Goma Gateway configurations
|
# Goma Gateway configurations
|
||||||
|
version: 0.1.7
|
||||||
gateway:
|
gateway:
|
||||||
# Proxy write timeout
|
# Proxy write timeout
|
||||||
writeTimeout: 15
|
writeTimeout: 15
|
||||||
# Proxy read timeout
|
# Proxy read timeout
|
||||||
readTimeout: 15
|
readTimeout: 15
|
||||||
# Proxy idle timeout
|
# Proxy idle timeout
|
||||||
idleTimeout: 60
|
idleTimeout: 30
|
||||||
## SSL Certificate file
|
## SSL Certificate file
|
||||||
sslCertFile: '' #cert.pem
|
sslCertFile: '' #cert.pem
|
||||||
## SSL Private Key file
|
## SSL Private Key file
|
||||||
sslKeyFile: ''#key.pem
|
sslKeyFile: ''#key.pem
|
||||||
# Proxy rate limit, it's In-Memory IP based
|
# Proxy rate limit, it's In-Memory IP based
|
||||||
rateLimiter: 0
|
rateLimit: 0
|
||||||
accessLog: "/dev/Stdout"
|
accessLog: "/dev/Stdout"
|
||||||
errorLog: "/dev/stderr"
|
errorLog: "/dev/stderr"
|
||||||
## Enable, disable routes health check
|
## Enable, disable routes health check
|
||||||
@@ -28,6 +29,8 @@ data:
|
|||||||
disableDisplayRouteOnStart: false
|
disableDisplayRouteOnStart: false
|
||||||
# disableKeepAlive allows enabling and disabling KeepALive server
|
# disableKeepAlive allows enabling and disabling KeepALive server
|
||||||
disableKeepAlive: false
|
disableKeepAlive: false
|
||||||
|
# Block common exploits | detect SQL injection, and simple XSS attempts
|
||||||
|
blockCommonExploits: false
|
||||||
# interceptErrors intercepts backend errors based on defined the status codes
|
# interceptErrors intercepts backend errors based on defined the status codes
|
||||||
interceptErrors:
|
interceptErrors:
|
||||||
- 405
|
- 405
|
||||||
@@ -47,7 +50,7 @@ data:
|
|||||||
##### Define routes
|
##### Define routes
|
||||||
routes:
|
routes:
|
||||||
# Example of a route | 1
|
# Example of a route | 1
|
||||||
- name: Public
|
- name: Public # Name is optional
|
||||||
# host Domain/host based request routing
|
# host Domain/host based request routing
|
||||||
host: "" # Host is optional
|
host: "" # Host is optional
|
||||||
path: /public
|
path: /public
|
||||||
@@ -55,6 +58,8 @@ data:
|
|||||||
# e.g rewrite: /store to /
|
# e.g rewrite: /store to /
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
|
# Limit HTTP methods allowed for this route
|
||||||
|
methods: [POST, PUT, GET]
|
||||||
#DisableHeaderXForward Disable X-forwarded header.
|
#DisableHeaderXForward Disable X-forwarded header.
|
||||||
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
||||||
# It will not match the backend route, by default, it's disabled
|
# It will not match the backend route, by default, it's disabled
|
||||||
@@ -84,6 +89,7 @@ data:
|
|||||||
path: /protected
|
path: /protected
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
|
methods: []
|
||||||
healthCheck:
|
healthCheck:
|
||||||
cors: {}
|
cors: {}
|
||||||
middlewares:
|
middlewares:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ gateway:
|
|||||||
# Proxy read timeout
|
# Proxy read timeout
|
||||||
readTimeout: 15
|
readTimeout: 15
|
||||||
# Proxy idle timeout
|
# Proxy idle timeout
|
||||||
idleTimeout: 60
|
idleTimeout: 30
|
||||||
## SSL Certificate file
|
## SSL Certificate file
|
||||||
sslCertFile: '' #cert.pem
|
sslCertFile: '' #cert.pem
|
||||||
## SSL Private Key file
|
## SSL Private Key file
|
||||||
@@ -23,6 +23,7 @@ gateway:
|
|||||||
disableDisplayRouteOnStart: false
|
disableDisplayRouteOnStart: false
|
||||||
# disableKeepAlive allows enabling and disabling KeepALive server
|
# disableKeepAlive allows enabling and disabling KeepALive server
|
||||||
disableKeepAlive: false
|
disableKeepAlive: false
|
||||||
|
# Block common exploits | detect SQL injection, and simple XSS attempts
|
||||||
blockCommonExploits: false
|
blockCommonExploits: false
|
||||||
# interceptErrors intercepts backend errors based on defined the status codes
|
# interceptErrors intercepts backend errors based on defined the status codes
|
||||||
interceptErrors:
|
interceptErrors:
|
||||||
@@ -43,7 +44,7 @@ gateway:
|
|||||||
##### Define routes
|
##### Define routes
|
||||||
routes:
|
routes:
|
||||||
# Example of a route | 1
|
# Example of a route | 1
|
||||||
- name: Public
|
- name: Public # Name is optional
|
||||||
# host Domain/host based request routing
|
# host Domain/host based request routing
|
||||||
host: "" # Host is optional
|
host: "" # Host is optional
|
||||||
path: /public
|
path: /public
|
||||||
@@ -51,6 +52,7 @@ gateway:
|
|||||||
# e.g rewrite: /store to /
|
# e.g rewrite: /store to /
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
|
# Limit HTTP methods allowed for this route
|
||||||
methods: [POST, PUT, GET]
|
methods: [POST, PUT, GET]
|
||||||
#DisableHeaderXForward Disable X-forwarded header.
|
#DisableHeaderXForward Disable X-forwarded header.
|
||||||
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
||||||
@@ -81,6 +83,7 @@ gateway:
|
|||||||
path: /protected
|
path: /protected
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
|
methods: []
|
||||||
healthCheck:
|
healthCheck:
|
||||||
cors: {}
|
cors: {}
|
||||||
middlewares:
|
middlewares:
|
||||||
@@ -139,3 +142,43 @@ middlewares:
|
|||||||
- /api-docs/*
|
- /api-docs/*
|
||||||
- /internal/*
|
- /internal/*
|
||||||
- /actuator/*
|
- /actuator/*
|
||||||
|
- name: oauth-google
|
||||||
|
type: oauth
|
||||||
|
paths:
|
||||||
|
- /protected
|
||||||
|
- /example-of-oauth
|
||||||
|
rule:
|
||||||
|
clientId: xxx
|
||||||
|
clientSecret: xxx
|
||||||
|
provider: google
|
||||||
|
endpoint:
|
||||||
|
userInfoUrl: ""
|
||||||
|
redirectUrl: http://localhost:8080/callback
|
||||||
|
redirectPath: ""
|
||||||
|
cookiePath: ""
|
||||||
|
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
|
||||||
|
- name: oauth-authentik
|
||||||
|
type: oauth
|
||||||
|
paths:
|
||||||
|
- /protected
|
||||||
|
- /example-of-oauth
|
||||||
|
rule:
|
||||||
|
clientId: xxx
|
||||||
|
clientSecret: xxx
|
||||||
|
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: http://localhost:8080/callback
|
||||||
|
redirectPath: ""
|
||||||
|
cookiePath: ""
|
||||||
|
scopes:
|
||||||
|
- email
|
||||||
|
- openid
|
||||||
|
state: randomStateString
|
||||||
|
jwtSecret: your-strong-jwt-secret | It's optional
|
||||||
2
goma.yml
2
goma.yml
@@ -5,7 +5,7 @@ gateway:
|
|||||||
# Proxy read timeout
|
# Proxy read timeout
|
||||||
readTimeout: 15
|
readTimeout: 15
|
||||||
# Proxy idle timeout
|
# Proxy idle timeout
|
||||||
idleTimeout: 60
|
idleTimeout: 30
|
||||||
## SSL Certificate file
|
## SSL Certificate file
|
||||||
sslCertFile: '' #cert.pem
|
sslCertFile: '' #cert.pem
|
||||||
## SSL Private Key file
|
## SSL Private Key file
|
||||||
|
|||||||
Reference in New Issue
Block a user