I’m encountering a peculiar issue with Airflow. I’ve stored a private key as a variable in Airflow, but it seems to be adding an extra backslash () to newline characters (
n
).
Here’s an example of the problem:
"-----BEGIN RSA PRIVATE KEY-----nABCDEFGHIJKLMOnPQRSTUVW...."
(Local)
"-----BEGIN RSA PRIVATE KEY-----\nABCDEFGHIJKLMO\nPQRSTUVW...."
(Airflow)
It appears that when I save the key, Airflow parses it and adds these extra backslashes. This happens after I press save; the key looks fine when I initially paste it.
What I’ve Tried
I’ve attempted to store the key in various formats, but the extra backslashes always seem to get added. I’m looking for a way to either prevent Airflow from adding these extra backslashes or a method to correctly handle and clean up the key when retrieving it.
Any guidance or suggestions on how to address this would be greatly appreciated.
1