Repository navigation
Conversation
A secrets backend's kwargs can also be set one key at a time, and those values carry the same credentials as backend_kwargs itself. The config API recognised them only under the literal [secrets] and [workers] section names, so a team scoped spelling would be returned in full by GET /config once secrets backends become team aware.
ityashag
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
potiuk,
rawwar and
shubhamraj-git
as code owners
November 13, 2026 08:24
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A secrets backend's kwargs can also be set one key at a time (
AIRFLOW__SECRETS__BACKEND_KWARG__<KEY>, and the[workers]equivalent). Those values carry the same credentials asbackend_kwargsitself, such as a Vaultrole_idorsecret_id. The config API redacted them by matching the literalsecretsandworkerssection names in the API layer, so a team scoped spelling was not recognised: the[<team>=secrets]section, orAIRFLOW__<TEAM>___SECRETS__BACKEND_KWARG__*, which is reported under a section named after the team. As the issue notes, nothing leaks today because the secrets backend is not team aware, but the check fails open the moment it becomes so.This recognises the per-key options in
AirflowConfigParser.is_sensitive_option, next to the team scoped resolution added in #70755, soas_dictand both config endpoints apply one rule to every spelling. The API-only prefix list and helpers are removed, andmask_secretsreads the same list of backend kwargs options.The per-key API tests mocked
conf.as_dictto return unredacted values, so they only exercised the removed helper. They now set real environment variables and check the redaction end to end, for the base spellings and the team scoped one.closes: #71037
Checks run:
uv run --project shared/configuration pytest shared/configuration/tests/configuration/test_parser.py: 70 passed. The two new tests fail against the parser onmain.uv run --project airflow-core pytest airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_config.py: 43 passed. With the source files frommain, the team scoped cases fail in both endpoints.prek runon the changed files, including mypy forshared-configurationandairflow-core: passed. Hooks that need breeze were skipped (SKIP_BREEZE_PREK_HOOKS), andbreeze verifywas not run.conf.as_dict(display_sensitive=False)over 420 options went from 0.75 ms to 0.81 ms, andis_sensitive_optionadds about 0.2 µs per call.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.