Skip to content

Handle missing Keycloak resources as access denied#68951

Merged
vincbeck merged 3 commits into
apache:mainfrom
onlyarnav:keylcloak-error-on-teams-not-defined
Jun 25, 2026
Merged

Handle missing Keycloak resources as access denied#68951
vincbeck merged 3 commits into
apache:mainfrom
onlyarnav:keylcloak-error-on-teams-not-defined

Conversation

@onlyarnav

Copy link
Copy Markdown
Contributor

Fix Keycloak auth manager handling for missing team-scoped Dag resources.

When Keycloak returns a 500 resource not found response for a missing authorization resource, the Keycloak auth manager now treats that check as denied access and logs a warning instead of raising an exception. This prevents one missing team resource from breaking the /dags and home screens for every user.

Added coverage for:

  • Missing Keycloak authorization resources returning False.
  • Dag filtering continuing to return authorized Dags when one team-scoped Keycloak resource is missing.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nit. Also, can you reproduce this issue or is it theoretical?

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 25, 2026
@vincbeck vincbeck merged commit b411423 into apache:main Jun 25, 2026
77 checks passed
@boring-cyborg

boring-cyborg Bot commented Jun 25, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@onlyarnav onlyarnav deleted the keylcloak-error-on-teams-not-defined branch June 25, 2026 19:46
shahar1 added a commit to shahar1/airflow that referenced this pull request Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the
2026-06-16 wave after binding -1 votes; their blockers are now resolved, so
re-cut the same versions with the fixes folded in. fab and keycloak need
corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client
integration was reverted from core (apache#68856) and a Keycloak access-denied
bug fix (apache#68951). celery (3.21.0) adds a Python 3.14 worker start-method
config (apache#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes
client 36.x (apache#69032).
shahar1 added a commit to shahar1/airflow that referenced this pull request Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the
2026-06-16 wave after binding -1 votes; their blockers are now resolved, so
re-cut the same versions with the fixes folded in. fab and keycloak need
corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client
integration was reverted from core (apache#68856) and a Keycloak access-denied
bug fix (apache#68951). celery (3.21.0) adds a Python 3.14 worker start-method
config (apache#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes
client 36.x (apache#69032).
shahar1 added a commit that referenced this pull request Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the
2026-06-16 wave after binding -1 votes; their blockers are now resolved, so
re-cut the same versions with the fixes folded in. fab and keycloak need
corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client
integration was reverted from core (#68856) and a Keycloak access-denied
bug fix (#68951). celery (3.21.0) adds a Python 3.14 worker start-method
config (#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes
client 36.x (#69032).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi team: keycloak returns 500 error on /dags screen when teams are not defined in the keycloak client

4 participants