-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update manifests to enable authorization check mechanisms for katib-U…
…I in kubeflow mode (#2041) * Upgrade manifests to enable authorization check mechanisms for katib-UI Changes to install-with-kubeflow manifests: * Enable istio sidecar injection for katib-ui component * Add AuthorizationPolicy to allow only istio-ingressgateway to talk to katib-ui [user traffic]. * Set APP_DISABLE_AUTH ENV var to false when in kubeflow-mode to enable authorization checks in UI's backend * Extend the RBAC persmissions of katib-ui so it can crate SAR objects when in kubeflow-mode Signed-off-by: Apostolos Gerakaris <[email protected]> * UI(back): Secure /katib/fetch_trial/ route Introduce authn/authz checks in the backend Signed-off-by: Apostolos Gerakaris <[email protected]> * review: Remove duplicate dependencies Signed-off-by: Apostolos Gerakaris <[email protected]> * review: Move patch to a separate file Signed-off-by: Apostolos Gerakaris <[email protected]> Signed-off-by: Apostolos Gerakaris <[email protected]>
- Loading branch information
Showing
6 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
manifests/v1beta1/installs/katib-with-kubeflow/istio-authorizationpolicy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: katib-ui | ||
namespace: kubeflow | ||
spec: | ||
action: ALLOW | ||
selector: | ||
matchLabels: | ||
katib.kubeflow.org/component: ui | ||
rules: | ||
- from: | ||
- source: | ||
principals: ["cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
manifests/v1beta1/installs/katib-with-kubeflow/patches/enable-ui-authz-checks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- op: add | ||
path: /spec/template/spec/containers/0/env/- | ||
value: | ||
name: APP_DISABLE_AUTH | ||
value: "false" |
10 changes: 10 additions & 0 deletions
10
manifests/v1beta1/installs/katib-with-kubeflow/patches/istio-sidecar-injection.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: "katib-ui" | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
sidecar.istio.io/inject: "true" |
7 changes: 7 additions & 0 deletions
7
manifests/v1beta1/installs/katib-with-kubeflow/patches/ui-rbac.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- op: add | ||
path: /rules/- | ||
value: | ||
apiGroups: [authorization.k8s.io] | ||
resources: [subjectaccessreviews] | ||
verbs: [create] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters