airflow Variable, Connections 암호화 하는 법.

airflow.cfg


# Secret key to save connection passwords in the db
fernet_key = cryptography_not_found_storing_passwords_in_plain_text


fernet_key를 저부분에 생성해서 넣으면 됨.


주의1 ::: 이후 한글키나 한글값을 저장하면 다음과 같은 오류가 남.

알아서 코드나 디비를 수정 하길... 바람. 참고주소 https://libsora.so/posts/python-hangul/

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 0: ordinal
not in range(128)


주의2 ::: 이전에 만든키는 그냥 일반키이다.


fernet_key 만든는 방법. 

$ pip install cryptography

안깔려 있으니 설치 한다. (  https://cryptography.io/en/latest/installation/  )


$ python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print FERNET_KEY"


콘솔창에 치면 다음줄에 키값이 떨어질텐데 이걸 위에 넣으면 됨.


..



hook

http://tech.marksblogg.com/airflow-postgres-redis-forex.html




'몰라그거무서운거 > 기타등등' 카테고리의 다른 글

쿠베 메모  (0) 2021.04.26
Docker compose yml 작성시..  (0) 2021.04.12
hive 에서 create table 등이 안될 때...  (0) 2021.04.02
java 추가 설치중 에러가...  (0) 2021.02.24
sqoop 메모.  (0) 2018.07.19

+ Recent posts