[ 
https://issues.apache.org/jira/browse/AIRFLOW-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536379#comment-16536379
 ] 

ASF subversion and git services commented on AIRFLOW-2710:
----------------------------------------------------------

Commit f65507fcd4632c9050d10e0911e00e8f5c6557b1 in incubator-airflow's branch 
refs/heads/v1-10-test from [~mthorley]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=f65507f ]

[AIRFLOW-2710] Clarify fernet key value in documentation

Closes #3574 from padwasabimasala/AIRFLOW-2710

(cherry picked from commit 6b7645261b5df69b01936838f38f7f701a667518)
Signed-off-by: Bolke de Bruin <[email protected]>


> Configuration documentation is misleading to the uninitiated
> ------------------------------------------------------------
>
>                 Key: AIRFLOW-2710
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2710
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Matthew Thorley
>            Priority: Major
>             Fix For: 1.10.0
>
>
> The documentation on this page on the configuration page 
> [https://airflow.apache.org/configuration.html] is slightly misleading 
> It reads
> 2. Generate fernet_key, using this code snippet below. fernet_key must be a 
> base64-encoded 32-byte key.
> from cryptography.fernet import Fernet fernet_key= Fernet.generate_key() 
> print(fernet_key) # your fernet_key, keep it in secured place!
>  3. Replace {{airflow.cfg}} fernet_key value with the one from step 2.
> The value returned in step one is something like  
> _b'K_8Yv52REP1qsa7OPupKYJe_CzngMI_KqwfM-2qAyVs='_
> which lead me to believe the config was suppose to be
> fernet_key = b'K_8Yv52REP1qsa7OPupKYJe_CzngMI_KqwfM-2qAyVs='
> When in fact it should be 
> fernet_key = K_8Yv52REP1qsa7OPupKYJe_CzngMI_KqwfM-2qAyVs=
> I assumed the config parse needed to know it was a byte string and would 
> handle the value correctly. After wasting 30mins I was able to figure out the 
> solution, and probably could have arrived at it sooner had I been more 
> familiar with python.
> But I recommend changing the docs as below to avoid confusion for other new 
> users.
>  
>  _from cryptography.fernet import Fernet fernet_key= Fernet.generate_key() 
> print(fernet_key.decode()) # your fernet_key, keep it in secured place!_
>   
>  
> I'll submit a pr for this shortly.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to