Skip to content

Commit

Permalink
set auth_backend for fab sec manager (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliotta authored Oct 1, 2021
1 parent 988baa0 commit e0575d9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Testing

This project uses the [helm-unittest project](https://github.com/quintush/helm-unittest) to test the helm charts included within. Once that plugin is installed, you can run tests with `helm unitest -3 .`
This project uses the [helm-unittest project](https://github.com/quintush/helm-unittest) to test the helm charts included within. Once that plugin is installed, you can run tests with `helm unittest -3 .`

## Writing tests

Expand Down
19 changes: 19 additions & 0 deletions tests/configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,22 @@ tests:
- notMatchRegex:
path: data.airflow_local_settings\.py
pattern: '{"somekey":"somevalue"}'
- it: should use default auth_backend value deny_all
asserts:
- matchRegex:
path: data.airflow\.cfg
pattern: "airflow.api.auth.backend.deny_all"
- notMatchRegex:
path: data.airflow\.cfg
pattern: "astronomer.flask_appbuilder.current_user_backend"
- it: should use fab security auth_backend value when useAstroSecurityManager is enabled
set:
airflow:
useAstroSecurityManager: true
asserts:
- matchRegex:
path: data.airflow\.cfg
pattern: "astronomer.flask_appbuilder.current_user_backend"
- notMatchRegex:
path: data.airflow\.cfg
pattern: "airflow.api.auth.backend.deny_all"
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ airflow:
"sidecar.istio.io/inject": "false"

config:
api:
auth_backend: '{{ ternary "astronomer.flask_appbuilder.current_user_backend" "airflow.api.auth.backend.deny_all" .Values.useAstroSecurityManager }}'
operators:
default_queue: celery
celery: # compat
Expand Down

0 comments on commit e0575d9

Please sign in to comment.