Skip to content

fix(api): deny all API requests#504

Merged
mfocko merged 1 commit intopackit:mainfrom
mfocko:fix/421-for-api-requests
Jan 16, 2025
Merged

fix(api): deny all API requests#504
mfocko merged 1 commit intopackit:mainfrom
mfocko:fix/421-for-api-requests

Conversation

@mfocko
Copy link
Member

@mfocko mfocko commented Jan 16, 2025

@mfocko mfocko requested a review from nforro January 16, 2025 15:27
@mfocko mfocko self-assigned this Jan 16, 2025
@usercont-release-bot
Copy link

usercont-release-bot commented Jan 16, 2025

Preview: https://packit-dashboard-pr-504.surge.sh (deployed at Thu 16 Jan 2025, 15:31 UTC)

There seems to be a relation to the persistent connections of the HTTP/2
(initial connection with TLS handshake is done to the dashboard; SNI is
‹dashboard.packit.dev› and with the same SNI it makes a request to the
Packit Service API, thus resulting in the request being routed to the
dashboard rather than the production API itself, since the routing for
TLS Passthrough connections is done based on the SNI).

Therefore yield 421 for each such misdirected request to force the
browser to open a new connection.

Fixes packit/packit-service#2529

Signed-off-by: Matej Focko <mfocko@redhat.com>
@softwarefactory-project-zuul
Copy link
Contributor

@mfocko mfocko force-pushed the fix/421-for-api-requests branch from d1ab3a6 to 65e4b70 Compare January 16, 2025 15:30
@softwarefactory-project-zuul
Copy link
Contributor

Copy link
Collaborator

@Venefilyn Venefilyn left a comment

Choose a reason for hiding this comment

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

Seems like a very niche issue. Great work you both on debugging this! Code LGTM 🎉

@mfocko mfocko added this pull request to the merge queue Jan 16, 2025
Merged via the queue into packit:main with commit 338767f Jan 16, 2025
3 checks passed
@mfocko mfocko deleted the fix/421-for-api-requests branch January 16, 2025 15:43
Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

thanks a lot!

@Venefilyn Venefilyn mentioned this pull request Jan 24, 2025
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.

403 Forbidden from API endpoints

5 participants