Skip to content

Commit

Permalink
Remove envoyfilter in identity aware manifest and fix bugs (kubeflow#944
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Jeffwan committed Feb 25, 2020
1 parent a95de6b commit f7e0947
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 42 deletions.
2 changes: 1 addition & 1 deletion aws/aws-istio-authz-adaptor/base/instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
spec:
template: authzadaptor
params:
key: request.headers["x-amzn-oidc-data"] | "unknown"
key: request.headers["$(origin-header)"] | "unknown"
2 changes: 1 addition & 1 deletion aws/aws-istio-authz-adaptor/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ configMapGenerator:
generatorOptions:
disableNameSuffixHash: true
vars:
- name: namespace
- name: istio-namespace
objref:
kind: ConfigMap
name: aws-authzadaptor-parameters
Expand Down
2 changes: 1 addition & 1 deletion aws/aws-istio-authz-adaptor/base/rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
# restrict the rule to the ingress gateway proxy workload only
match: context.reporter.kind == "outbound" && source.labels["istio"] == "ingressgateway"
actions:
- handler: authzadaptor-handler.$(namespace)
- handler: authzadaptor-handler.$(istio-namespace)
instances: ["authzadaptor-instance"]
# assign a name to the action
name: action
Expand Down
14 changes: 3 additions & 11 deletions kfdef/kfctl_aws_cognito.v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ spec:
name: manifests
path: istio/istio
name: istio
- kustomizeConfig:
parameters:
- name: namespace
value: istio-system
repoRef:
name: manifests
path: istio/add-anonymous-user-filter
name: add-anonymous-user-filter
- kustomizeConfig:
repoRef:
name: manifests
Expand Down Expand Up @@ -339,12 +331,12 @@ spec:
overlays:
- application
parameters:
- name: namespace
value: istio-system
- name: origin-header
value: x-amzn-oidc-header
value: x-amzn-oidc-data
- name: custom-header
value: kubeflow-userid
- name: istio-namespace
value: istio-system
repoRef:
name: manifests
path: aws/aws-istio-authz-adaptor
Expand Down
14 changes: 3 additions & 11 deletions kfdef/kfctl_aws_cognito.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ spec:
name: manifests
path: istio/istio
name: istio
- kustomizeConfig:
parameters:
- name: namespace
value: istio-system
repoRef:
name: manifests
path: istio/add-anonymous-user-filter
name: add-anonymous-user-filter
- kustomizeConfig:
repoRef:
name: manifests
Expand Down Expand Up @@ -339,12 +331,12 @@ spec:
overlays:
- application
parameters:
- name: namespace
value: istio-system
- name: origin-header
value: x-amzn-oidc-header
value: x-amzn-oidc-data
- name: custom-header
value: kubeflow-userid
- name: istio-namespace
value: istio-system
repoRef:
name: manifests
path: aws/aws-istio-authz-adaptor
Expand Down
14 changes: 3 additions & 11 deletions kfdef/source/master/kfctl_aws_cognito.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ spec:
name: manifests
path: istio/istio
name: istio
- kustomizeConfig:
parameters:
- name: namespace
value: istio-system
repoRef:
name: manifests
path: istio/add-anonymous-user-filter
name: add-anonymous-user-filter
- kustomizeConfig:
repoRef:
name: manifests
Expand Down Expand Up @@ -339,12 +331,12 @@ spec:
overlays:
- application
parameters:
- name: namespace
value: istio-system
- name: origin-header
value: x-amzn-oidc-header
value: x-amzn-oidc-data
- name: custom-header
value: kubeflow-userid
- name: istio-namespace
value: istio-system
repoRef:
name: manifests
path: aws/aws-istio-authz-adaptor
Expand Down
6 changes: 3 additions & 3 deletions tests/aws-aws-istio-authz-adaptor-base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
spec:
template: authzadaptor
params:
key: request.headers["x-amzn-oidc-data"] | "unknown"
key: request.headers["$(origin-header)"] | "unknown"
`)
th.writeF("/manifests/aws/aws-istio-authz-adaptor/base/rule.yaml", `
apiVersion: config.istio.io/v1alpha2
Expand All @@ -110,7 +110,7 @@ spec:
# restrict the rule to the ingress gateway proxy workload only
match: context.reporter.kind == "outbound" && source.labels["istio"] == "ingressgateway"
actions:
- handler: authzadaptor-handler.$(namespace)
- handler: authzadaptor-handler.$(istio-namespace)
instances: ["authzadaptor-instance"]
# assign a name to the action
name: action
Expand Down Expand Up @@ -158,7 +158,7 @@ configMapGenerator:
generatorOptions:
disableNameSuffixHash: true
vars:
- name: namespace
- name: istio-namespace
objref:
kind: ConfigMap
name: aws-authzadaptor-parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
spec:
template: authzadaptor
params:
key: request.headers["x-amzn-oidc-data"] | "unknown"
key: request.headers["$(origin-header)"] | "unknown"
`)
th.writeF("/manifests/aws/aws-istio-authz-adaptor/base/rule.yaml", `
apiVersion: config.istio.io/v1alpha2
Expand All @@ -161,7 +161,7 @@ spec:
# restrict the rule to the ingress gateway proxy workload only
match: context.reporter.kind == "outbound" && source.labels["istio"] == "ingressgateway"
actions:
- handler: authzadaptor-handler.$(namespace)
- handler: authzadaptor-handler.$(istio-namespace)
instances: ["authzadaptor-instance"]
# assign a name to the action
name: action
Expand Down Expand Up @@ -209,7 +209,7 @@ configMapGenerator:
generatorOptions:
disableNameSuffixHash: true
vars:
- name: namespace
- name: istio-namespace
objref:
kind: ConfigMap
name: aws-authzadaptor-parameters
Expand Down

0 comments on commit f7e0947

Please sign in to comment.