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

Flyte Admin RBAC + Project/Domain Isolation #6190

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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: 3 additions & 2 deletions charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ helm install gateway bitnami/contour -n flyte
| common.ingress.tls | object | `{"enabled":false}` | - Ingress hostname host: |
| common.ingress.webpackHMR | bool | `false` | - Enable or disable HMR route to flyteconsole. This is useful only for frontend development. |
| configmap.admin | object | `{"admin":{"clientId":"{{ .Values.secrets.adminOauthClientCredentials.clientId }}","clientSecretLocation":"/etc/secrets/client_secret","endpoint":"flyteadmin:81","insecure":true},"event":{"capacity":1000,"rate":500,"type":"admin"}}` | Admin Client configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/subworkflow/launchplan#AdminConfig) |
| configmap.adminServer | object | `{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}}` | FlyteAdmin server configuration |
| configmap.adminServer.auth | object | `{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}}` | Authentication configuration |
| configmap.adminServer | object | `{"auth":{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"rbac":{"bypassMethodPatterns":["/grpc.health.v1.Health/.*","/flyteidl.service.AuthMetadataService/.*"],"enabled":false,"policies":[{"role":"admin","rules":[{"methodPattern":".*","name":"Admin allow all"}]},{"role":"flytesnacks-engineer","rules":[{"domain":"development","methodPattern":".*","name":"Flytesnacks engineer dev write access","project":"flytesnacks"},{"domain":"production","methodPattern":"List.*|Get.*","name":"Flytesnacks engineer prod read access","project":"flytesnacks"}]}],"tokenScopeRoleResolver":{"enabled":true}},"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}},"flyteadmin":{"eventVersion":2,"metadataStoragePrefix":["metadata","admin"],"metricsScope":"flyte:","profilerPort":10254,"roleNameKey":"iam.amazonaws.com/role","testing":{"host":"http://flyteadmin"}},"server":{"grpc":{"port":8089},"httpPort":8088,"security":{"allowCors":true,"allowedHeaders":["Content-Type","flyte-authorization"],"allowedOrigins":["*"],"secure":false,"useAuth":false}}}` | FlyteAdmin server configuration |
| configmap.adminServer.auth | object | `{"appAuth":{"thirdPartyConfig":{"flyteClient":{"clientId":"flytectl","redirectUri":"http://localhost:53593/callback","scopes":["offline","all"]}}},"authorizedUris":["https://localhost:30081","http://flyteadmin:80","http://flyteadmin.flyte.svc.cluster.local:80"],"rbac":{"bypassMethodPatterns":["/grpc.health.v1.Health/.*","/flyteidl.service.AuthMetadataService/.*"],"enabled":false,"policies":[{"role":"admin","rules":[{"methodPattern":".*","name":"Admin allow all"}]},{"role":"flytesnacks-engineer","rules":[{"domain":"development","methodPattern":".*","name":"Flytesnacks engineer dev write access","project":"flytesnacks"},{"domain":"production","methodPattern":"List.*|Get.*","name":"Flytesnacks engineer prod read access","project":"flytesnacks"}]}],"tokenScopeRoleResolver":{"enabled":true}},"userAuth":{"openId":{"baseUrl":"https://accounts.google.com","clientId":"657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com","scopes":["profile","openid"]}}}` | Authentication configuration |
| configmap.adminServer.auth.rbac | object | `{"bypassMethodPatterns":["/grpc.health.v1.Health/.*","/flyteidl.service.AuthMetadataService/.*"],"enabled":false,"policies":[{"role":"admin","rules":[{"methodPattern":".*","name":"Admin allow all"}]},{"role":"flytesnacks-engineer","rules":[{"domain":"development","methodPattern":".*","name":"Flytesnacks engineer dev write access","project":"flytesnacks"},{"domain":"production","methodPattern":"List.*|Get.*","name":"Flytesnacks engineer prod read access","project":"flytesnacks"}]}],"tokenScopeRoleResolver":{"enabled":true}}` | RBAC / Authorization configuration |
| configmap.adminServer.server.security.secure | bool | `false` | Controls whether to serve requests over SSL/TLS. |
| configmap.adminServer.server.security.useAuth | bool | `false` | Controls whether to enforce authentication. Follow the guide in https://docs.flyte.org/ on how to setup authentication. |
| configmap.catalog | object | `{"catalog-cache":{"endpoint":"datacatalog:89","insecure":true,"type":"datacatalog"}}` | Catalog Client configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/catalog#Config) Additional advanced Catalog configuration [here](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/pluginmachinery/catalog#Config) |
Expand Down
23 changes: 23 additions & 0 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,29 @@ configmap:
- profile
- openid
clientId: 657465813211-6eog7ek7li5k7i7fvgv2921075063hpe.apps.googleusercontent.com
# -- RBAC / Authorization configuration
rbac:
enabled: false
bypassMethodPatterns:
- "/grpc.health.v1.Health/.*"
- "/flyteidl.service.AuthMetadataService/.*"
tokenScopeRoleResolver:
enabled: true
policies:
- role: "admin"
rules:
- name: "Admin allow all"
methodPattern: ".*"
- role: "flytesnacks-engineer"
rules:
- name: "Flytesnacks engineer dev write access"
methodPattern: ".*"
project: flytesnacks
domain: development
- name: "Flytesnacks engineer prod read access"
methodPattern: "List.*|Get.*"
project: flytesnacks
domain: production

# -- Datacatalog server config
datacatalogServer:
Expand Down
24 changes: 23 additions & 1 deletion deployment/eks/flyte_aws_scheduler_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -858,7 +880,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "c943b200cd0bed97fe456c0c713dd79cdc4e22133495cac89db3fc55e9b79c7"
configChecksum: "155fefcf10a34c12d481f97e8b8fe2f5c794b81a23a39001f661773cf44de92"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down
26 changes: 24 additions & 2 deletions deployment/eks/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -561,7 +583,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "391e8e126d669f751ac1a03de0b45fe7969a0fe58f3dfead9bb7be1b5d951ff"
configChecksum: "6dfd34f2ffa25346bfecaa5de1366a20fad2571e1fe7787e302c69a1a627e8c"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -983,7 +1005,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "391e8e126d669f751ac1a03de0b45fe7969a0fe58f3dfead9bb7be1b5d951ff"
configChecksum: "6dfd34f2ffa25346bfecaa5de1366a20fad2571e1fe7787e302c69a1a627e8c"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
26 changes: 24 additions & 2 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -889,7 +911,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "391e8e126d669f751ac1a03de0b45fe7969a0fe58f3dfead9bb7be1b5d951ff"
configChecksum: "6dfd34f2ffa25346bfecaa5de1366a20fad2571e1fe7787e302c69a1a627e8c"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -1311,7 +1333,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "391e8e126d669f751ac1a03de0b45fe7969a0fe58f3dfead9bb7be1b5d951ff"
configChecksum: "6dfd34f2ffa25346bfecaa5de1366a20fad2571e1fe7787e302c69a1a627e8c"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
26 changes: 24 additions & 2 deletions deployment/gcp/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -576,7 +598,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "20a517901c6b6f01f47e968fa15ca51f6d9522e728ecace8b48553eb428cde6"
configChecksum: "af09b0696664b8187b3388d48fc57012fd0d5ff6403bda51904f000b5efe904"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -998,7 +1020,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "20a517901c6b6f01f47e968fa15ca51f6d9522e728ecace8b48553eb428cde6"
configChecksum: "af09b0696664b8187b3388d48fc57012fd0d5ff6403bda51904f000b5efe904"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
26 changes: 24 additions & 2 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -912,7 +934,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "20a517901c6b6f01f47e968fa15ca51f6d9522e728ecace8b48553eb428cde6"
configChecksum: "af09b0696664b8187b3388d48fc57012fd0d5ff6403bda51904f000b5efe904"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -1334,7 +1356,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "20a517901c6b6f01f47e968fa15ca51f6d9522e728ecace8b48553eb428cde6"
configChecksum: "af09b0696664b8187b3388d48fc57012fd0d5ff6403bda51904f000b5efe904"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
26 changes: 24 additions & 2 deletions deployment/sandbox/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,28 @@ data:
- https://localhost:30081
- http://flyteadmin:80
- http://flyteadmin.flyte.svc.cluster.local:80
rbac:
bypassMethodPatterns:
- /grpc.health.v1.Health/.*
- /flyteidl.service.AuthMetadataService/.*
enabled: false
policies:
- role: admin
rules:
- methodPattern: .*
name: Admin allow all
- role: flytesnacks-engineer
rules:
- domain: development
methodPattern: .*
name: Flytesnacks engineer dev write access
project: flytesnacks
- domain: production
methodPattern: List.*|Get.*
name: Flytesnacks engineer prod read access
project: flytesnacks
tokenScopeRoleResolver:
enabled: true
userAuth:
openId:
baseUrl: https://accounts.google.com
Expand Down Expand Up @@ -6696,7 +6718,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "f2d2bbea27b58cc5a73da30eb8aeb56fc41863f4eba2bfe407da2e97a6372e8"
configChecksum: "aed279976feb8cc5f4d9baed5fb6f613ddc36756d2c86ff0085856ffcce3ba5"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -7089,7 +7111,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "f2d2bbea27b58cc5a73da30eb8aeb56fc41863f4eba2bfe407da2e97a6372e8"
configChecksum: "aed279976feb8cc5f4d9baed5fb6f613ddc36756d2c86ff0085856ffcce3ba5"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/complete-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: NmdFQmhIcGQ3QUY4anJ4OQ==
haSharedSecret: bFgyOTlldkF3bmFqTEhubw==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1418,7 +1418,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: e70b19a9c6f4e7c05fff1fb0b2adc885112a99eab0fc2a893762513e45e1a230
checksum/secret: ca5a0367eab28eacc1eb8f4d4d8c0c9cc7f87532bb832198bd92765a51c2fbb5
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: TG9qSkFYNDBjc3JJakxZYw==
haSharedSecret: VFN0czllS0ZURjg5ZjNNag==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1367,7 +1367,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: a6fd0b4e81971aff50f056b2beddcb3b0eb480659bcea29f287a9773123ede6c
checksum/secret: fd1e68d273dadaad26f90b7f2a54a13e3eb9e0c88f338eaa629dea52e7d8af83
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ metadata:
---
apiVersion: v1
data:
haSharedSecret: Q2dOYmdSM0FNbnJSUE9qcA==
haSharedSecret: Q3QzVkxzSnUzU1hmMnAySg==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -934,7 +934,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 2fd78377e09dbed8a7a620d718063e8bb1478d7c233bec3b5ebc32bcc255c0d4
checksum/secret: fee3b71f2cfab2c3f3744a8082704a8683711312862377f7b7efb9a13421d25e
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
Loading
Loading