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

backstage-showcase "not found" error handler doesn't work for plugin endpoints #1023

Open
AndrienkoAleksandr opened this issue Feb 27, 2024 · 0 comments
Labels
jira Sync this issue with Jira kind/bug Something isn't working status/triage

Comments

@AndrienkoAleksandr
Copy link
Contributor

Describe the bug

backstage-showcase "not found" handler doesn't work for plugin endpoints

Expected Behavior

Request should fail with 404 error

What are the steps to reproduce this bug?

  1. Execute backstage with enabled dynamic plugins.

  2. Call endpoint url for plugin which actually doesn't exist:

curl http://localhost:7007/api/sonarqube/.well-known/backstage/permissions/metadata
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Janus Community Showcase"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><link rel="icon" href=""/><title>Janus IDP Backstage Showcase</title><script defer="defer" src="/static/runtime.a8aaf76e.js"></script><script defer="defer" src="/static/main.a8aaf76e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>Oleksandrs-MacBook-Pro:backstage oandriie$ curl http://localhost:7007/api/sonarqube/.well-known/backstage/permissions/metadata -v
*   Trying [::1]:7007...
* Connected to localhost (::1) port 7007
> GET /api/sonarqube/.well-known/backstage/permissions/metadata HTTP/1.1
> Host: localhost:7007
> User-Agent: curl/8.4.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Security-Policy: default-src 'self';base-uri 'self';font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self' 'unsafe-eval';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests;connect-src 'self' http: https:
< Referrer-Policy: no-referrer
< Strict-Transport-Security: max-age=15552000; includeSubDomains
< X-Content-Type-Options: nosniff
< X-DNS-Prefetch-Control: off
< X-Download-Options: noopen
< X-Frame-Options: DENY
< X-Permitted-Cross-Domain-Policies: none
< X-XSS-Protection: 0
< cache-control: no-store, max-age=0
< Accept-Ranges: bytes
< Last-Modified: Mon, 13 Nov 2023 13:12:06 GMT
< ETag: W/"417-18bc8cf89b4"
< Content-Type: text/html; charset=UTF-8
< Content-Length: 1047
< Vary: Accept-Encoding
< Date: Tue, 27 Feb 2024 22:57:53 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< 
* Connection #0 to host localhost left intact
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Janus Community Showcase"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><link rel="icon" href=""/><title>Janus IDP Backstage Showcase</title><script defer="defer" src="/static/runtime.a8aaf76e.js"></script><script defer="defer" src="/static/main.a8aaf76e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Versions of software used and environment

@AndrienkoAleksandr AndrienkoAleksandr added kind/bug Something isn't working status/triage labels Feb 27, 2024
@github-actions github-actions bot added the jira Sync this issue with Jira label Feb 27, 2024
@AndrienkoAleksandr AndrienkoAleksandr changed the title backstage-showcase "not found" handler doesn't work for plugin endpoints backstage-showcase "not found" error handler doesn't work for plugin endpoints Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Sync this issue with Jira kind/bug Something isn't working status/triage
Projects
None yet
Development

No branches or pull requests

1 participant