Update build configuration and improve token handling
Build and Test / verify (push) Failing after 1m22s
Build and Test / verify (push) Failing after 1m22s
- Change CI container image to debian:trixie-slim and set GOPROXY. - Update Go version to 1.26 in Dockerfile and go.mod. - Refactor token validation to use SHA-256 hashes instead of plain tokens. - Add network policy to restrict access to the service. - Enhance README with new configuration details and usage examples. - Add tests for new token hash validation logic.
This commit is contained in:
@@ -4,6 +4,8 @@ metadata:
|
||||
name: gitea-mcp-auth-proxy
|
||||
labels:
|
||||
app: gitea-mcp-auth-proxy
|
||||
annotations:
|
||||
security.note/healthz: "Do not expose /healthz publicly; keep service internal and restrict ingress at network/ingress layer."
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@@ -24,7 +26,7 @@ spec:
|
||||
env:
|
||||
- name: AUTH_PROXY_LISTEN_ADDR
|
||||
value: ":8080"
|
||||
- name: AUTH_PROXY_TOKENS_DIR
|
||||
- name: AUTH_PROXY_TOKEN_HASHES_DIR
|
||||
value: /var/run/secrets/auth-proxy
|
||||
- name: AUTH_PROXY_LOG_LEVEL
|
||||
value: info
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: gitea-mcp-auth-proxy-ingress
|
||||
labels:
|
||||
app: gitea-mcp-auth-proxy
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: gitea-mcp-auth-proxy
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
# Assumption: Traefik Pods run in namespace kube-system and expose label app.kubernetes.io/name=traefik.
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
# Assumption: Prometheus Pods run in namespace monitoring and expose label app.kubernetes.io/name=prometheus.
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: monitoring
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: prometheus
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
Reference in New Issue
Block a user