Coder Social home page Coder Social logo

alphagov / paas-ip-authentication-route-service Goto Github PK

View Code? Open in Web Editor NEW
7.0 11.0 11.0 28 KB

A cloud foundry compatible route service that imposes an IP safelist

License: MIT License

Shell 100.00%
paas cloud-foundry route-service nginx reliability-engineering

paas-ip-authentication-route-service's Introduction

GOV.UK PaaS IP authentication route service

This repo contains a simple Nginx application which acts as a proxy for your web applications and provides an IP restriction layer.

This repo is a template, which you should customise according to your needs using the application manifest.

All PaaS traffic will go through the route service to filter traffic.

Requirements

You should log in using the Cloud Foundry CLI (https://docs.cloud.service.gov.uk/#setting-up-the-command-line).

For all actions you should always make sure you are targeting the correct space.

Customisation

Edit the manifest.yml and change the ALLOWED_IPS as appropriate.

Deployment by hand

To deploy the app, run cf push.

If you have not overwritten the ((app-name)) variables then you will need to run cf push --var app-name=my-app

If you want to add a custom route, add a route definition to the manifest:

  - name: ((app-name))
    routes:
      - route: my-subdomain.my-domain.com
    ...

Deployment by script

This repository provides a script that will deploy and configure this route service for you. See the example below for how to use it.

ALLOWED_IPS="comma_separated_list_of_ips_eg_1.2.3.4,5.6.7.8" \
ROUTE_SERVICE_APP_NAME="name_of_the_app_to_push" \
ROUTE_SERVICE_NAME="name_of_the_route_service_to_create" \
PROTECTED_APP_NAME="name_of_the_app_to_protect" \
./deploy.sh

Use the app as a route service

Please refer to the official GOV.UK PaaS documentation on route services for steps on deploying the route service.

Checking that it works

The route service exposes two paths for checking the status.

The path /_route-service-health is for information and health checking, and has stats about the number of active connections which exist.

The path /_route-service-check is for checking if you may use the route service. If you are, then you will receive OK, if you are not you will received Forbidden by ((app-name)), where ((app-name)) is the value of the APP_NAME environment variable.

paas-ip-authentication-route-service's People

Contributors

ap-hunt avatar bandesz avatar kentsanggds avatar murilodalri avatar pburkholder avatar philandstuff avatar richardtowers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.