Skip to content
Snippets Groups Projects
security.rst 1.15 KiB
Newer Older
Varac's avatar
Varac committed
=====================
Security
=====================

Access control
==============

By default, the applications on your Stackspin cluster will be exposed to the whole
Maarten de Waard's avatar
Maarten de Waard committed
internet (although they are password protected).

Varac's avatar
Varac committed
If you like to limit who can access your cluster resources you can configure
the Stackspin ingress (`ingress-nginx <https://kubernetes.github.io/ingress-nginx>`__)
to only accept connections from a certain IP address or range.
Varac's avatar
Varac committed

Follow the :ref:`customizing:Customize Stackspin applications` instructions, but use the following
secret as ``install/overrides/stackspin-nginx-override.yml`` and apply the secret in
the ``stackspin`` namespace instead of ``stackspin-apps``. Replace the source range with the
Maarten de Waard's avatar
Maarten de Waard committed
IP address ranges you want to allow.
Varac's avatar
Varac committed

Maarten de Waard's avatar
Maarten de Waard committed
.. code-block:: yaml
Varac's avatar
Varac committed

Maarten de Waard's avatar
Maarten de Waard committed
   ---
   apiVersion: v1
   kind: secret
   metadata:
     name: stackspin-nginx-override
Maarten de Waard's avatar
Maarten de Waard committed
   data:
     values.yaml: |
       controller:
         config:
           # https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#whitelist-source-range
           # comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1.
           whitelist-source-range: 1.2.3.4/24