Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: 404 on successful login via OIDC if web_host config option is empty #2681

Open
MatthewHana opened this issue Jan 7, 2025 · 1 comment
Assignees
Labels

Comments

@MatthewHana
Copy link

MatthewHana commented Jan 7, 2025

Issue

Problem
If Semaphore is hosted without a subpath such as https://semaphoreserver.local:9999/ then according to the config docs the relevant option for the setting web_host should not have a trailing slash and should be empty in the config.

When logging in via OIDC (and perhaps other OAuth mechanisms) a successful auth flow returns the user to https://https://semaphoreserver.local:9999/api/auth/oidc/oidcprovidername/ with a HTTP 404 error and fails to redirect them to the Semaphore UI. Navigating away from this page to a URL such as https://semaphoreserver.local:9999/project/1/history works, which shows that the user has logged in successfully.

Cause & Workaround
After changing the web_host config value to "/" and restarting Semaphore, the user is now properly redirected upon a successful auth flow. I am not sure if this has any other negative impacts.

This behaviour could potentially be the cause for issues #1434, #2659, and #2666👿.

Impact

Web-Frontend (what users interact with), Web-Backend (APIs)

Installation method

Package

Database

BoltDB

Browser

Chrome

Semaphore Version

2.11.2-0e9490c-1735214524

Ansible Version

Not relevant.

Logs & errors

No response

Manual installation - system information

OS: Debian
Reverse proxy: Nginx

Configuration

No response

Additional information

No response

@MatthewHana
Copy link
Author

MatthewHana commented Jan 8, 2025

Update: Workaround resolved issues #2659 and #2666- showing that all three issues have the same root cause.

@fiftin fiftin self-assigned this Jan 10, 2025
@fiftin fiftin added the bug label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants