mirror of
https://github.com/swisscom/ip-whitelisting-route-service-demo-app.git
synced 2026-12-04 11:39:02 +00:00
A demo app for an IP whitelisting route service in Cloud Foundry | Read-only mirror of https://github.com/swisscom/ip-whitelisting-route-service-demo-app — Swisscom. Issues & pull requests at the source.
- Go 73.6%
- Makefile 26.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .cfignore | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| go.mod | ||
| ip-whitelist.conf | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| manifest.yml | ||
| README.md | ||
ip-whitelisting-route-service-demo-app
A demo app for an IP whitelisting route service in Cloud Foundry
How to use
# edit IP whitelist, can contain single IPs or whole subnet ranges
vim ip-whitelist.conf
# push this app
cf push route-service-demo
# create a route service with this app
# https://docs.developer.swisscom.com/services/route-services.html#user-provided
cf create-user-provided-service route-service-demo -r https://ip-whitelisting-demo.scapp.swisscom.com
# check route service if it's there
cf service route-service-demo
# bind the new route service to any of your other apps you want to protect
# https://docs.developer.swisscom.com/devguide/services/route-binding.html
cf bind-route-service scapp.swisscom.com route-service-demo --hostname my-other-app-to-be-protected
# check route if it's there
cf routes | grep my-other-app-to-be-protected
Guide
See https://blog.jamesclonk.io/posts/ip-whitelisting-with-a-route-service/ for a more detailed explanation.