Skip to content

fix: enable guest auth sign-in for RHDH 2.x local setup - #357

Merged
rm3l merged 1 commit into
redhat-developer:release-2.1from
Fortune-Ndlovu:fix/guest-auth-sign-in-rhdhbugs-3962
Oct 23, 2026
Merged

rm3l merged 1 commit into
redhat-developer:release-2.1from
Fortune-Ndlovu:fix/guest-auth-sign-in-rhdhbugs-3962

Conversation

@Fortune-Ndlovu

@Fortune-Ndlovu Fortune-Ndlovu commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What this PR does

Fix guest auth in RHDH Local 2.1 by waiting for dynamic plugin install before backend startup and explicitly setting sign-in page to guest so the frontend shows it because the backend could start before the plugin was ready and the frontend can't see backend-only auth config. So without those two changes, there'd be no guest sign-in option.

How to test

git checkout release-2.1
podman compose down -v
podman compose up
# Open http://localhost:7007 — should show the homepage with "Good morning, Guest!"

Related issues

@rhdh-qodo-merge

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Fix guest sign-in for RHDH 2.x local setup

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes


AI Description

• Wait for dynamic plugin installation to finish before starting RHDH, so guest auth can register.
• Configure the guest sign-in page explicitly because the frontend cannot discover backend-only auth
 providers.
Diagram

graph TD
  Installer["Plugin installer"] --> Artifacts["Config and lock"] --> Gate{"Install complete?"} --> Backend["RHDH backend"] --> Frontend["Guest sign-in"]
  Config["Local app config"] --> Frontend
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Expose auth provider discovery upstream
  • ➕ Could eliminate explicit sign-in configuration for future providers.
  • ➖ Requires changes beyond the local setup and careful control of frontend-visible auth configuration.
  • ➖ Does not address the plugin installation race.

Recommendation: Use the PR’s local fix: the installer lock closes the startup race, and signInPage supplies the frontend with the guest choice without changing upstream provider schemas.

Files changed (2) +16 / -3

Bug fix (2) +16 / -3
app-config.yamlSelect guest as the frontend sign-in provider +6/-0

Select guest as the frontend sign-in provider

• Adds the top-level signInPage setting so the frontend displays guest sign-in even though auth.providers.guest is backend-only.

configs/app-config/app-config.yaml

wait-for-plugins-and-start.shWait for dynamic plugin extraction before backend startup +10/-3

Wait for dynamic plugin extraction before backend startup

• Requires the generated plugin config to exist and the installer lock to be absent before starting RHDH. This prevents startup while the guest auth plugin is still being extracted.

wait-for-plugins-and-start.sh

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo


Resolved findings
1. GitHub users cannot choose GitHub sign-in ✓ Resolved
Description
The default signInPage: guest selects only Guest for the frontend, independently of providers
added under auth.providers. When users follow the GitHub authentication guide, its local
configuration adds the GitHub provider but never overrides signInPage, so the documented login
flow has no GitHub option.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Guest sign-in default remains in effect when users follow the documented GitHub authentication setup, leaving no GitHub option on the sign-in page.
## Fix Focus Areas
- configs/app-config/app-config.yaml[8-12]
- docs/rhdh-local-guide/github-auth.md[63-97]
## Recommended Fix
Update the GitHub guide's local configuration example to set `signInPage: github` at the top level, and explain that users configuring another sign-in provider must override the Guest default.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



@rhdh-qodo-merge

Copy link
Copy Markdown
Contributor

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@Fortune-Ndlovu
Fortune-Ndlovu force-pushed the fix/guest-auth-sign-in-rhdhbugs-3962 branch from 81cd377 to 2035fe7 Compare October 23, 2026 11:01
@Fortune-Ndlovu

Copy link
Copy Markdown
Member Author

/agentic_review

@rm3l

rm3l commented Oct 23, 2026

Copy link
Copy Markdown
Member

/cc

@openshift-ci
openshift-ci Bot requested a review from rm3l October 23, 2026 12:18
Comment thread configs/app-config/app-config.yaml
Comment thread docs/rhdh-local-guide/github-auth.md

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, I'm wondering why our current CI here didn't catch this issue at all.. Would it be possible to have a test to avoid a future regression on this?
(but not a blocker for this PR, we can look into this in a followup issue..)

@rm3l

rm3l commented Oct 23, 2026

Copy link
Copy Markdown
Member

/cherrypick dev

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: once the present PR merges, I will cherry-pick it on top of dev in a new PR and assign it to you.

Details

In response to this:

/cherrypick dev

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Fortune-Ndlovu
Fortune-Ndlovu force-pushed the fix/guest-auth-sign-in-rhdhbugs-3962 branch from 2035fe7 to e101822 Compare October 23, 2026 13:15
@Fortune-Ndlovu

Fortune-Ndlovu commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Agreed this would be good to have. Happy to follow up with a test that verifies the sign-in page loads without errors after podman compose up. Jira; https://redhat.atlassian.net/browse/RHDHBUGS-4049

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. I think it is also a good opportunity here to replace this guest reference with ref://backstage-plugin-auth-backend-module-guest-provider, as the guest provider is available in the DPDY.

RHDH 2+ no longer bundles auth provider plugins statically, which means
the guest auth provider is now loaded as a dynamic plugin at startup.
This caused two problems that prevented the sign-in page from working
out of the box:

1. The wait-for-plugins-and-start.sh script was only checking for the
   dynamic plugins config YAML to exist before starting the backend,
   but it was not waiting for all plugin packages to finish extracting.
   This meant the guest auth backend module could arrive after the auth
   system had already initialized, resulting in the provider never being
   registered.

2. The frontend app-auth plugin discovers available sign-in providers
   from the config keys under auth.providers, but those keys have
   backend-only visibility in the config schema. The frontend could not
   see them, so it displayed 'No authentication providers are configured'
   even when the backend had the guest provider fully working.

This commit fixes both issues:
- The startup script now also waits for the installer lock file to be
  removed, ensuring all dynamic plugin directories are fully extracted
  before RHDH starts.
- A new signInPage: guest directive (with frontend visibility) is added
  to app-config.yaml so the app-auth plugin knows to render the guest
  sign-in button.
- The GitHub authentication guide is updated to include signInPage: github
  in its example config, so users who switch to GitHub auth will also
  get the correct sign-in page.

Resolves: RHDHBUGS-3962

Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu
Fortune-Ndlovu force-pushed the fix/guest-auth-sign-in-rhdhbugs-3962 branch from 7ee72f9 to 975ef6e Compare October 23, 2026 15:15
@Fortune-Ndlovu

Fortune-Ndlovu commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Good call, updated. The guest provider reference now uses ref://backstage-plugin-auth-backend-module-guest-provider since it's available in the DPDY. Also removed the stale TODO comment.

@sonarqubecloud

Copy link
Copy Markdown

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Fortune-Ndlovu !!

@rm3l
rm3l merged commit 2a58097 into redhat-developer:release-2.1 Oct 23, 2026
23 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: new pull request created: #359

Details

In response to this:

/cherrypick dev

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants