-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Encrypt passwords #267
Encrypt passwords #267
Conversation
Thanks for adding this. I'm thinking about change management here and wondering how to approach this to make it easy on the community. What about adding a Also I had spotted this before, but I don't think it's as flexible as your solution since we wouldn't be able to decrypt or not based on the What do you think? |
Yeah, I explicitly left out the change management piece because I didn't know the best way to proceed. I'm ok with your approach. Let me fix this up and send it over. |
I went a little overboard here and that's largely due to there not being a way to upgrade the metadata database. If there was a way to do it, it wasn't obvious to me. Plus the If a user already has airflow running, they can issue a new command called If the user is creating airflow from scratch, all of the migrations and current quickstart guide will run as expected For those wanting to help develop and need to create a database migration the workflow would look something like this:
From there, the appropriate steps can be taken to do the migration or what ever else needs to be taken care of. This pull request kinda went in all sorts of directions. Let me know if this isn't what you were expecting and I can change it. |
I think this is great! You're addressing overdue things I've been putting off for a while (encryption + alembic). I'm very familiar with Django's "south" module but was putting off alembic for no good reason (mostly putting off having to deal with change management and the scare of me or anyone in the community getting tangled as I used to with Django's south before knowing it well...). |
The PR looks solid after a quick scan. I'm out sailing today (Airbnb offsite!), but I'll actually take a backup of our production db hopefully tomorrow and get this running. I'd be nice to add a piece of code that runs early in the CLI and looks for the alembic version in the code versus the one in the DB and suggests the user to take a backup and run |
I tried installing and it looks like I need What about making encryption an opt-in feature? (It's really important to me to allow people to Let me know if this goes beyond your original intent, I can take over the branch. |
I think this brings up an interesting dichotomy. On one hand, you want to be able to quickly run Anyway, I'm getting off track. As an alternative, would it be ok to put instructions on how to install libffi-dev per OS environment in the airflow instructions because it would a dependency of the project? |
Let's get best of both worlds. It's really important to me to be able to get going instantly. Many operators don't require passwords (BashOperator, PythonOperator, HiveOperator, Presto*, ... ), and sometimes people don't have sudo rights on the boxes they need Airflow to work on. If someone simply wants to go through the tutorial I don't want them to spend more time installing software than it takes them to go through the tutorial... Anyhow, this make it very clear that the passwords are stored in clear, and the steps to take to address it: |
No worries. Let me get this fixed up. |
Let me know if you want me to squash commits. I rolled in your feedback on the try blocks around crypto. |
['known_event_type.id'], ), | ||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ), | ||
sa.PrimaryKeyConstraint('id') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome -- just want to point out that we added a new table xcom
. Thanks!
Alright, so I didn't know how to add on to a PR coming from a fork so I ended up fetching your branch, rebasing it, testing it, tweaking it a bit in different ways and created a new PR with a new commit on top here: I think it's ready to merge, though merging means it hits production at Airbnb and late Saturday night is probably not the best idea if I want to make sure I can enjoy my Sunday tomorrow :) So I'm planning on making this PR hit the metal sometime Monday morning. Thanks again for this stellar PR. Not only addressing a major flaw, but also setting Alembic which will help us tremendously at growing this piece of software in a smooth way. |
closing PR as a result of #292 merge. thanks @mistercrunch |
…nEntryFacet nodes (apache#267) Signed-off-by: olek <[email protected]>
This should encrypt the passwords that are saved in the metadata database. If #254 gets merged first, I'll fix any merge conflicts on this one.