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

Warning when Fernet/Webserver keys are randomly generated #18098

Closed
2 tasks done
potiuk opened this issue Sep 8, 2021 · 1 comment
Closed
2 tasks done

Warning when Fernet/Webserver keys are randomly generated #18098

potiuk opened this issue Sep 8, 2021 · 1 comment
Assignees
Labels

Comments

@potiuk
Copy link
Member

potiuk commented Sep 8, 2021

Description

While I think the random generation is rather useful for quick start, maybe it should be accompanied by a big fat warning (possibly including a warning generated in the UI) - directing user to generate both Fernet Key and Webserver key manually. We already'we done a few of those - for example Sequential executor + Sqlite recently.

I think showing a UI warning is the only one that is going to work, but it will be very effective and make people generate those keys eventually.

Use case/motivation

When users install airllow for a "quick" start with Helm Chart, they might not realise, that they should generate the keys. While this is useful to generate the keys, the behaviour is not nice when the Helm Chart is upgraded and the keys regenerated - for example when you use argocd.

We should make it very clear for the users trying out airflow, that the setting they use for "quick start" is not good for "production" and rather than relying on generating the keys randomly they should generate and configure their keys manually.

Related issues

#18079 (comment)

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@potiuk potiuk added the kind:feature Feature Requests label Sep 8, 2021
@kaxil kaxil added this to the Airflow Helm Chart 1.2.0 milestone Sep 8, 2021
@jedcunningham jedcunningham self-assigned this Sep 14, 2021
kaxil pushed a commit that referenced this issue Sep 20, 2021
Allow alert messages to be displayed on the UI dashboard from
`airflow_local_settings`. This feature can be used to announce things to
all users, warn about setup limitations/issues, and probably other
things I haven't considered.

The message, category, and role(s) the flash message should be shown to
can be configured.

Here is an example:

In `airflow_local_settings`:
```
from airflow.www.utils import UIAlert
DASHBOARD_FLASH_MESSAGES = [
    UIAlert("hello", category="error"),
    UIAlert("world", roles=["Viewer", "Admin"]),
    UIAlert('Visit <a href="https://airflow.apache.org">airflow.apache.org</a>'), html=True),
    UIAlert("Only for users", roles=["Users"]),
]
```

View as an Admin user:
![Screen Shot 2021-09-15 at 5 28 49 PM](https://user-images.githubusercontent.com/66968678/133526478-9aa12dde-5c31-4be9-a9ae-4e31141630d4.png)

View as a User user:
![Screen Shot 2021-09-15 at 5 35 42 PM](https://user-images.githubusercontent.com/66968678/133526629-2567e977-87ac-4a23-a28a-94ae7a5d7d30.png)

related: #18098
@jedcunningham
Copy link
Member

The secret key warning will be in place for chart 1.2.0 and Airflow 2.2.0.

I've opened a new issue (#18509) to cover the fernet key portion of this as it requires more than just a warning message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants