-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encrypting the passwords out of connection strings
- Loading branch information
1 parent
d8c79cd
commit 8522791
Showing
4 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
panoramix/migrations/versions/289ce07647b_add_encrypted_password_field.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Add encrypted password field | ||
Revision ID: 289ce07647b | ||
Revises: 2929af7925ed | ||
Create Date: 2015-11-21 11:18:00.650587 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '289ce07647b' | ||
down_revision = '2929af7925ed' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy_utils.types.encrypted import EncryptedType | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
'dbs', | ||
sa.Column( | ||
'password', | ||
EncryptedType(sa.String(1024)), | ||
nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('dbs', 'password') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters