Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| efe7f574cb | |||
| 26a42717c9 | |||
| b75036b756 | |||
| 15abaac453 | |||
| 24218d4d50 | |||
| 70b652b079 | |||
| f6ad2edde4 | |||
| 1fb779255f | |||
| 93856cc30e |
@@ -0,0 +1,46 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: auth-proxy
|
||||
spec:
|
||||
forwardAuth:
|
||||
address: http://auth-proxy.auth-proxy.svc:80/auth
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- X-Auth-Request-User
|
||||
- X-Auth-Request-Email
|
||||
- X-Auth-Request-Groups
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: secret-reader
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`pass.hexor.cy`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: auth-proxy
|
||||
services:
|
||||
- name: secret-reader
|
||||
port: 80
|
||||
tls:
|
||||
secretName: secret-reader-tls
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: secret-reader-tls
|
||||
spec:
|
||||
secretName: secret-reader-tls
|
||||
issuerRef:
|
||||
name: letsencrypt
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- pass.hexor.cy
|
||||
|
||||
+16
-17
@@ -24,31 +24,30 @@ configs:
|
||||
statusbadge.enabled: true
|
||||
timeout.reconciliation: 60s
|
||||
oidc.config: |
|
||||
name: Authentik
|
||||
issuer: https://idm.hexor.cy/application/o/argocd/
|
||||
name: Keycloak
|
||||
issuer: https://auth.hexor.cy/auth/realms/hexor
|
||||
clientID: $oidc-creds:id
|
||||
clientSecret: $oidc-creds:secret
|
||||
requestedScopes: ["openid", "profile", "email", "groups", "offline_access"]
|
||||
requestedScopes: ["openid", "profile", "email", "offline_access"]
|
||||
requestedIDTokenClaims: {"groups": {"essential": true}}
|
||||
refreshTokenThreshold: 2m
|
||||
rbac:
|
||||
create: true
|
||||
policy.default: ""
|
||||
policy.csv: |
|
||||
# Bound OIDC Group and internal role
|
||||
g, Game Servers Managers, GameServersManagersRole
|
||||
# Role permissions
|
||||
p, GameServersManagersRole, applications, get, games/*, allow
|
||||
p, GameServersManagersRole, applications, update, games/*, allow
|
||||
p, GameServersManagersRole, applications, sync, games/*, allow
|
||||
p, GameServersManagersRole, applications, override, games/*, allow
|
||||
p, GameServersManagersRole, applications, action/*, games/*, allow
|
||||
p, GameServersManagersRole, exec, create, games/*, allow
|
||||
p, GameServersManagersRole, logs, get, games/*, allow
|
||||
p, GameServersManagersRole, applications, delete, games/*, deny
|
||||
|
||||
# Admin policy
|
||||
g, ArgoCD Admins, role:admin
|
||||
g, game-servers-managers, GameServersManagersRole
|
||||
# Role permissions
|
||||
p, GameServersManagersRole, applications, get, games/*, allow
|
||||
p, GameServersManagersRole, applications, update, games/*, allow
|
||||
p, GameServersManagersRole, applications, sync, games/*, allow
|
||||
p, GameServersManagersRole, applications, override, games/*, allow
|
||||
p, GameServersManagersRole, applications, action/*, games/*, allow
|
||||
p, GameServersManagersRole, exec, create, games/*, allow
|
||||
p, GameServersManagersRole, logs, get, games/*, allow
|
||||
p, GameServersManagersRole, applications, delete, games/*, deny
|
||||
|
||||
# Admin policy
|
||||
g, argocd-admins, role:admin
|
||||
|
||||
secret:
|
||||
createSecret: true
|
||||
|
||||
@@ -17,7 +17,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: auth-proxy
|
||||
image: ultradesu/rsauth2-proxy:0.1.0
|
||||
image: ultradesu/rsauth2-proxy:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
- name: AUTH_PROXY_ROUTES_FILE
|
||||
value: "/config/routes.yaml"
|
||||
- name: AUTH_PROXY_LOG_LEVEL
|
||||
value: "info"
|
||||
value: "debug"
|
||||
volumeMounts:
|
||||
- name: routes
|
||||
mountPath: /config
|
||||
|
||||
@@ -7,4 +7,5 @@ resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- servicemonitor.yaml
|
||||
# routes.yaml ConfigMap is managed by Terraform (kubernetes_config_map)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: auth-proxy-metrics
|
||||
labels:
|
||||
app: auth-proxy
|
||||
release: prometheus
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: auth-proxy
|
||||
endpoints:
|
||||
- port: http
|
||||
path: /metrics
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
honorLabels: true
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- auth-proxy
|
||||
Reference in New Issue
Block a user