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

Add options to extend list of sensitive keywords #9397

Merged
merged 5 commits into from
Jun 20, 2020

Conversation

Marloxo
Copy link
Contributor

@Marloxo Marloxo commented Jun 19, 2020


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

this PR addressed the following issue: #9372

basically it's adding support for additional labels from the configuration so users can extend the matching of sensitive keywords in variables name.

@boring-cyborg boring-cyborg bot added area:dev-tools area:webserver Webserver related Issues labels Jun 19, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 19, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://apache-airflow-slack.herokuapp.com/

Copy link
Member

@mik-laj mik-laj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests to avoid regression?

@Marloxo
Copy link
Contributor Author

Marloxo commented Jun 19, 2020

sure, I will take a look and update here

@mik-laj
Copy link
Member

mik-laj commented Jun 19, 2020

Deleted

@mik-laj mik-laj self-requested a review June 19, 2020 07:36
@mik-laj
Copy link
Member

mik-laj commented Jun 19, 2020

@Marloxo Sorry. I wanted to publish it in another PR.

@Marloxo
Copy link
Contributor Author

Marloxo commented Jun 19, 2020

@mik-laj no worries, any advice what tests I shall add ?

@mik-laj
Copy link
Member

mik-laj commented Jun 19, 2020

You should use tests.test_utils.config.conf_vars decorator and check the configration option and return value. I would be happy if you would use parameterized to easily check many cases.

@Marloxo Marloxo force-pushed the omar/add_sensitive_fields branch from 3bf24ed to f22e3a3 Compare June 19, 2020 18:29
@Marloxo
Copy link
Contributor Author

Marloxo commented Jun 19, 2020

@mik-laj I updated the PR with tests, would you please take a look.

airflow/www/utils.py Outdated Show resolved Hide resolved
@mik-laj
Copy link
Member

mik-laj commented Jun 19, 2020

Can you also add docs to https://airflow.readthedocs.io/en/latest/security.html?

@mik-laj mik-laj self-requested a review June 19, 2020 19:50
@Marloxo Marloxo force-pushed the omar/add_sensitive_fields branch from f22e3a3 to 9949964 Compare June 20, 2020 10:19
@Marloxo Marloxo force-pushed the omar/add_sensitive_fields branch from 9949964 to 1c02123 Compare June 20, 2020 11:03
@mik-laj mik-laj changed the title Add sensitive_variable_fields option to extend DEFAULT_SENSITIVE_VARIABLE_FIELDS Add options to extend list of sensitive keywords Jun 20, 2020
@mik-laj mik-laj merged commit a450900 into apache:master Jun 20, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 20, 2020

Awesome work, congrats on your first merged pull request!

@Marloxo Marloxo deleted the omar/add_sensitive_fields branch June 20, 2020 13:53
@kaxil
Copy link
Member

kaxil commented Jun 20, 2020

The tests were failing for this PR, it broke Master. Created a PR to fix it: #9446

kaxil pushed a commit to kaxil/airflow that referenced this pull request Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:webserver Webserver related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants