Restrict anonymous Nightscout access to LAN
This commit is contained in:
@@ -11,4 +11,5 @@ resources:
|
||||
- nightscout-deployment.yaml
|
||||
- nightscout-service.yaml
|
||||
- nightscout-ingress.yaml
|
||||
- nightscout-lan-only.yaml
|
||||
- network-policy.yaml
|
||||
|
||||
@@ -9,6 +9,5 @@ data:
|
||||
INSECURE_USE_HTTP: "true"
|
||||
HOSTNAME: "0.0.0.0"
|
||||
ENABLE: "careportal basal iob cob bwp cage sage iage bage boluscalc pump openaps loop profile timeago bgnow delta direction upbat errorcodes ar2 rawbg"
|
||||
AUTH_DEFAULT_ROLES: "careportal"
|
||||
THEME: "colors"
|
||||
NODE_ENV: "production"
|
||||
|
||||
@@ -27,6 +27,10 @@ spec:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
# Set explicitly so changing anonymous access triggers a pod rollout.
|
||||
env:
|
||||
- name: AUTH_DEFAULT_ROLES
|
||||
value: "readable"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: nightscout-config
|
||||
|
||||
@@ -6,6 +6,8 @@ metadata:
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
# Nightscout grants anonymous read access; keep that access on the trusted LAN only.
|
||||
traefik.ingress.kubernetes.io/router.middlewares: nightscout-lan-only@kubernetescrd
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: nightscout-lan-only
|
||||
namespace: nightscout
|
||||
spec:
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
- 10.10.0.0/24
|
||||
Reference in New Issue
Block a user