Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/istio ory #58

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions k8s/eventrunner-api/base/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ metadata:
namespace: eventrunner
annotations:
cert-manager.io/cluster-issuer: threadr-issuer
nginx.ingress.kubernetes.io/service-upstream: "true"
nginx.ingress.kubernetes.io/upstream-vhost: oathkeeper-proxy.auth.svc.cluster.local
spec:
ingressClassName: nginx
tls:
Expand All @@ -21,7 +19,6 @@ spec:
pathType: Prefix
backend:
service:
name: oathkeeper-proxy # Just the service name
name: oathkeeper-proxy
port:
number: 4455
---
2 changes: 1 addition & 1 deletion k8s/eventrunner-api/base/istio-auth-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
app: eventrunner-api
action: CUSTOM
provider:
name: oathkeeper-ext-authz
name: ext-authz
rules:
- {}
16 changes: 7 additions & 9 deletions k8s/eventrunner-api/base/istio-mesh-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ data:
extensionProviders:
- name: "ext-authz"
envoyExtAuthzHttp:
service: "oathkeeper-proxy.auth.svc.cluster.local"
port: 4455
timeout: "10s"
includeRequestHeadersInCheck: ["authorization", "cookie"]
headersToUpstreamOnAllow: ["authorization", "cookie"]
headersToDownstreamOnDeny: ["content-type", "set-cookie"]
includeRequestBodyInCheck: true
maxRequestBytes: 8192
allowPartialMessage: true
service: "oathkeeper-api.auth.svc.cluster.local"
port: 4456
timeout: 10s
failOpen: false
statusOnError: "500"
pathPrefix: /decisions
includeRequestHeadersInCheck: ["authorization"]
2 changes: 1 addition & 1 deletion k8s/eventrunner-api/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
sidecar.istio.io/inject: "true"
spec:
ports:
- port: 8200
- port: 80
targetPort: 8200
protocol: TCP
name: http
Expand Down
2 changes: 1 addition & 1 deletion k8s/hydra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ ingress:
tls:
- secretName: auth-services-tls
hosts:
- hydra.tunnel.threadr.ai
- "*.tunnel.threadr.ai"
admin:
enabled: false
4 changes: 2 additions & 2 deletions k8s/kratos/kratos-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ingress:
tls:
- secretName: auth-services-tls
hosts:
- kratos.tunnel.threadr.ai
- "*.tunnel.threadr.ai"

log:
level: debug
Expand Down Expand Up @@ -294,7 +294,7 @@ kratos:
- id: github
provider: github
client_id: "{{ .Values.client_id }}"
lient_secret: "{{ .Values.client_secret }}"
client_secret: "{{ .Values.client_secret }}"
issuer_url: https://api.github.com
mapper_url: "base64://ewogICJpZGVudGl0eSI6IHsKICAgICJ0cmFpdHMiOiB7CiAgICAgICJlbWFpbCI6ICJ7eyAuY2xhaW1zLmVtYWlsIH19IiwKICAgICAgIm5hbWUiOiAie3sgLmNsYWltcy5uYW1lIH19IiwKICAgICAgInRlbmFudF9pZHMiOiBbImRlZmF1bHQiXSwKICAgICAgInByb2plY3RfaWQiOiAiMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwKICAgICAgInJvbGVzIjogWyJ1c2VyIl0KICAgIH0KICB9Cn0="
scope:
Expand Down
4 changes: 2 additions & 2 deletions k8s/oathkeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ oathkeeper:
{
"id": "eventrunner-rule",
"upstream": {
"url": "http://eventrunner-api.eventrunner.svc.cluster.local:8200"
"url": "http://eventrunner-api.eventrunner",
},
"match": {
"url": "http://api.tunnel.threadr.ai/<.*>",
"url": "https://api.tunnel.threadr.ai/api/<.*>",
"methods": [
"GET",
"POST",
Expand Down
8 changes: 7 additions & 1 deletion k8s/tls/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Certificate
metadata:
name: auth-services-tls
namespace: auth
labels:
app.kubernetes.io/name: auth-services
spec:
secretName: auth-services-tls
duration: 2160h # 90 days
Expand All @@ -12,4 +14,8 @@ spec:
name: threadr-issuer
commonName: "*.tunnel.threadr.ai"
dnsNames:
- "*.tunnel.threadr.ai"
- "*.tunnel.threadr.ai"
usages:
- digital signature
- key encipherment
- server auth
Loading