Compare commits

..

3 Commits

Author SHA1 Message Date
8fa81be750 new mtls approach
All checks were successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
2025-11-29 22:55:42 +01:00
205baa7e01 mtls fix 3
Some checks failed
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline failed
ci/woodpecker/push/deploy/2 unknown status
ci/woodpecker/push/deploy/3 unknown status
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/deploy/1 unknown status
ci/woodpecker/push/deploy/4 unknown status
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
2025-11-29 22:19:12 +01:00
f3f9238d5f mtls fix 2
Some checks failed
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/predeploy Pipeline failed
ci/woodpecker/push/build/3 Pipeline failed
ci/woodpecker/push/build/4 Pipeline failed
ci/woodpecker/push/deploy/1 unknown status
ci/woodpecker/push/deploy/2 unknown status
ci/woodpecker/push/deploy/3 unknown status
ci/woodpecker/push/deploy/4 unknown status
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
2025-11-29 22:02:11 +01:00
4 changed files with 0 additions and 102 deletions

View File

@@ -33,7 +33,6 @@ steps:
--namespace=$NAMESPACE
--dry-run=client -o yaml | kubectl apply -f -
- kubectl apply -f deployment/configmap.yaml -n $NAMESPACE
- kubectl apply -f deployment/mtls-config.yaml -n $NAMESPACE
when:
event: [tag]

View File

@@ -100,31 +100,3 @@ spec:
targetPort: 8001
name: http
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production-http
traefik.ingress.kubernetes.io/router.middlewares: homea2-mtls-auth@kubernetescrd,homea2-security-headers@kubernetescrd
traefik.ingress.kubernetes.io/router.tls.options: homea2-homea2-mtls@kubernetescrd
# Traefik 2 mTLS Configuration
traefik.ingress.kubernetes.io/router.tls.options: homea2-mtls@kubernetescrd
traefik.ingress.kubernetes.io/router.middlewares: homea2-mtls-auth@kubernetescrd
spec:
tls:
- hosts:
- homea2-api.hottis.de
secretName: homea2-api-cert
rules:
- host: homea2-api.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api
port:
number: 80

View File

@@ -1,45 +0,0 @@
apiVersion: traefik.containo.us/v1alpha1
kind: TLSOption
metadata:
name: homea2-mtls
spec:
clientAuth:
secretNames:
- mtls-ca-cert
clientAuthType: RequireAndVerifyClientCert
minVersion: "VersionTLS12"
cipherSuites:
- "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
- "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
- "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
- "TLS_RSA_WITH_AES_256_GCM_SHA384"
- "TLS_RSA_WITH_AES_128_GCM_SHA256"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: mtls-auth
spec:
headers:
customRequestHeaders:
X-Client-Cert: ""
customResponseHeaders:
X-mTLS-Verified: "true"
# Optional: Add IP whitelist for additional security
# ipWhiteList:
# sourceRange:
# - "10.0.0.0/8"
# - "192.168.0.0/16"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: security-headers
spec:
headers:
customResponseHeaders:
X-Frame-Options: "SAMEORIGIN"
X-Content-Type-Options: "nosniff"
X-XSS-Protection: "1; mode=block"
Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload"
contentSecurityPolicy: "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'"

View File

@@ -77,31 +77,3 @@ spec:
targetPort: 8002
name: http
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ui-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production-http
traefik.ingress.kubernetes.io/router.middlewares: homea2-mtls-auth@kubernetescrd,homea2-security-headers@kubernetescrd
traefik.ingress.kubernetes.io/router.tls.options: homea2-homea2-mtls@kubernetescrd
# Traefik 2 mTLS Configuration
traefik.ingress.kubernetes.io/router.tls.options: homea2-mtls@kubernetescrd
traefik.ingress.kubernetes.io/router.middlewares: homea2-mtls-auth@kubernetescrd
spec:
tls:
- hosts:
- homea2.hottis.de
secretName: homea2-ui-cert
rules:
- host: homea2.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ui
port:
number: 80