stephen-bracken opened a new issue, #66148:
URL: https://github.com/apache/airflow/issues/66148

   ### Under which category would you file this issue?
   
   Providers
   
   ### Apache Airflow version
   
   3.2.0
   
   ### What happened and how to reproduce it?
   
   On login the following error occurs when using the Hashicorp VaultBackend 
for secrets:
   ```
                2026-04-30 10:47:16.407 
    [uvicorn.error] loc=httptools_impl.py:421
        
                2026-04-30 10:47:16.407 
   Traceback (most recent call last):
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py",
 line 416, in run_asgi
        
                2026-04-30 10:47:16.407 
       result = await app(  # type: ignore[func-returns-value]
        
                2026-04-30 10:47:16.407 
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/applications.py", 
line 1159, in __call__
        
                2026-04-30 10:47:16.407 
       await super().__call__(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/applications.py", 
line 107, in __call__
        
                2026-04-30 10:47:16.407 
       await self.middleware_stack(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py",
 line 186, in __call__
        
                2026-04-30 10:47:16.407 
       raise exc
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py",
 line 164, in __call__
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive, _send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/airflow/api_fastapi/common/http_access_log.py",
 line 83, in __call__
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive, capture_send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py",
 line 29, in __call__
        
                2026-04-30 10:47:16.407 
       await responder(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py",
 line 130, in __call__
        
                2026-04-30 10:47:16.407 
       await super().__call__(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py",
 line 46, in __call__
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive, self.send_with_compression)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/base.py",
 line 198, in __call__
        
                2026-04-30 10:47:16.407 
       raise app_exc
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/base.py",
 line 144, in coro
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive_or_disconnect, send_no_error)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py",
 line 63, in __call__
        
                2026-04-30 10:47:16.407 
       await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 53, in wrapped_app
        
                2026-04-30 10:47:16.407 
       raise exc
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 42, in wrapped_app
        
                2026-04-30 10:47:16.407 
       await app(scope, receive, sender)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py",
 line 18, in __call__
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
716, in __call__
        
                2026-04-30 10:47:16.407 
       await self.middleware_stack(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
736, in app
        
                2026-04-30 10:47:16.407 
       await route.handle(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
462, in handle
        
                2026-04-30 10:47:16.407 
       await self.app(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/applications.py", 
line 1159, in __call__
        
                2026-04-30 10:47:16.407 
       await super().__call__(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/applications.py", 
line 107, in __call__
        
                2026-04-30 10:47:16.407 
       await self.middleware_stack(scope, receive, send)
        
                2026-04-30 10:47:16.407 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py",
 line 186, in __call__
        
                2026-04-30 10:47:16.408 
       raise exc
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py",
 line 164, in __call__
        
                2026-04-30 10:47:16.408 
       await self.app(scope, receive, _send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py",
 line 63, in __call__
        
                2026-04-30 10:47:16.408 
       await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 53, in wrapped_app
        
                2026-04-30 10:47:16.408 
       raise exc
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 42, in wrapped_app
        
                2026-04-30 10:47:16.408 
       await app(scope, receive, sender)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py",
 line 18, in __call__
        
                2026-04-30 10:47:16.408 
       await self.app(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
716, in __call__
        
                2026-04-30 10:47:16.408 
       await self.middleware_stack(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
736, in app
        
                2026-04-30 10:47:16.408 
       await route.handle(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 
290, in handle
        
                2026-04-30 10:47:16.408 
       await self.app(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/routing.py", line 
134, in app
        
                2026-04-30 10:47:16.408 
       await wrap_app_handling_exceptions(app, request)(scope, receive, send)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 53, in wrapped_app
        
                2026-04-30 10:47:16.408 
       raise exc
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py",
 line 42, in wrapped_app
        
                2026-04-30 10:47:16.408 
       await app(scope, receive, sender)
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/routing.py", line 
120, in app
        
                2026-04-30 10:47:16.408 
       response = await f(request)
        
                2026-04-30 10:47:16.408 
                  ^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/routing.py", line 
674, in app
        
                2026-04-30 10:47:16.408 
       raw_response = await run_endpoint_function(
        
                2026-04-30 10:47:16.408 
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/fastapi/routing.py", line 
330, in run_endpoint_function
        
                2026-04-30 10:47:16.408 
       return await run_in_threadpool(dependant.call, **values)
        
                2026-04-30 10:47:16.408 
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/starlette/concurrency.py", 
line 32, in run_in_threadpool
        
                2026-04-30 10:47:16.408 
       return await anyio.to_thread.run_sync(func)
        
                2026-04-30 10:47:16.408 
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/anyio/to_thread.py", line 
63, in run_sync
        
                2026-04-30 10:47:16.408 
       return await get_async_backend().run_sync_in_worker_thread(
        
                2026-04-30 10:47:16.408 
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py",
 line 2518, in run_sync_in_worker_thread
        
                2026-04-30 10:47:16.408 
       return await future
        
                2026-04-30 10:47:16.408 
              ^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py",
 line 1002, in run
        
                2026-04-30 10:47:16.408 
       result = context.run(func, *args)
        
                2026-04-30 10:47:16.408 
                ^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/airflow/providers/keycloak/auth_manager/routes/login.py",
 line 61, in login
        
                2026-04-30 10:47:16.408 
       client = KeycloakAuthManager.get_keycloak_client()
        
                2026-04-30 10:47:16.408 
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py",
 line 380, in get_keycloak_client
        
                2026-04-30 10:47:16.408 
       client_secret = conf.get(CONF_SECTION_NAME, CONF_CLIENT_SECRET_KEY)
        
                2026-04-30 10:47:16.408 
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
                2026-04-30 10:47:16.408 
     File 
"/home/airflow/.local/lib/python3.11/site-packages/airflow/sdk/_shared/configuration/parser.py",
 line 1362, in get
        
                2026-04-30 10:47:16.408 
       raise AirflowConfigException(f"section/key [{section}/{key}] not found 
in config")
        
                2026-04-30 10:47:16.408 
   airflow.sdk._shared.configuration.exceptions.AirflowConfigException: 
section/key [keycloak_auth_manager/client_secret] not found in config
   ```
   
   airflow.cfg:
   ```
   [keycloak_auth_manager]
   client_secret_secret = "keycloak_client_secret"
   ```
   airflow envs:
   ```
   AIRFLOW__KEYCLOAK_AUTH_MANAGER__CLIENT_ID=my-airflow-client
   ```
   
   
   ### What you think should happen instead?
   
   The airflow config parser should detect that `client_secret_secret` is a 
secret in the backend when `conf.get("keycloak_auth_manager", "client_secret") 
is called.
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Apache Airflow Provider(s)
   
   keycloak
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-common-compat==1.14.1
   apache-airflow-providers-common-io==1.7.1
   apache-airflow-providers-common-messaging==2.0.2
   apache-airflow-providers-common-sql==1.33.0
   apache-airflow-providers-hashicorp==4.5.0
   apache-airflow-providers-keycloak==0.6.0
   apache-airflow-providers-standard==1.12.1
   apache-airflow-task-sdk==1.2.0
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   1.33.5
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### Anything else?
   
   Occurs on login redirect
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to