Skip to content

Conversation

albundy83
Copy link
Contributor


This will fix an issue that I have introduced myself with this commit.

See this comment and error description here.

Also add simple test to check generated value is in correct Fernet key format.

Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Jul 7, 2025
Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
@albundy83
Copy link
Contributor Author

When test fail, you have a nice:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cryptography.fernet.Fernet object at 0x7fe8226949a0>, key = b'\xd0\xec\x8a\xb5\xe6\xb4\x17\x1cG\'mU\xbea^\x9c\xdd\xd0\x11=w\xbe\xbc"', backend = None

    def __init__(
        self,
        key: bytes | str,
        backend: typing.Any = None,
    ) -> None:
        try:
            key = base64.urlsafe_b64decode(key)
        except binascii.Error as exc:
            raise ValueError(
                "Fernet key must be 32 url-safe base64-encoded bytes."
            ) from exc
        if len(key) != 32:
>           raise ValueError(
                "Fernet key must be 32 url-safe base64-encoded bytes."
            )
E           ValueError: Fernet key must be 32 url-safe base64-encoded bytes.

.venv/lib/python3.10/site-packages/cryptography/fernet.py:40: ValueError

@albundy83 albundy83 requested a review from jedcunningham July 7, 2025 22:43
albundy83 added 2 commits July 8, 2025 07:13
Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
@jedcunningham jedcunningham merged commit a4a5b8c into apache:main Jul 8, 2025
71 checks passed
@albundy83 albundy83 deleted the fix-fernet-secret branch July 8, 2025 13:09
HsiuChuanHsu pushed a commit to HsiuChuanHsu/airflow that referenced this pull request Jul 10, 2025
stephen-bracken pushed a commit to stephen-bracken/airflow that referenced this pull request Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants