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

[plugin] Public assets no longer exposed #83387

Closed
fastlorenzo opened this issue Nov 15, 2020 · 3 comments · Fixed by #83458
Closed

[plugin] Public assets no longer exposed #83387

fastlorenzo opened this issue Nov 15, 2020 · 3 comments · Fixed by #83458
Assignees
Labels
Team:Operations Team label for Operations Team

Comments

@fastlorenzo
Copy link

Kibana version: 7.10.0

Elasticsearch version: 7.10.0

Server OS version: Ubuntu 20.04

Browser version: Any

Browser OS version: Windows 10, Ubuntu 20.04

Original install method (e.g. download page, yum, from source, etc.): apt and from sources (tried both)

Describe the bug: In previous Kibana versions (7.9.2, 7.9.3), I was serving assets (images, html files, etc) by putting them in the public/assets folder of the Kibana plugin I was building. The assets where then available at /plugins/{PLUGIN_ID}/assets/{PATH}.
Since 7.10.0, trying to access the files returns a 404.

Steps to reproduce:

  1. Create a plugin
  2. Add assets in public/assets
  3. Build the plugin and install the zip in a clean Kibana install

Expected behavior: The browser should return the asset

Screenshots (if relevant): N/A

Errors in browser console (if relevant): N/A

Provide logs and/or server output (if relevant):

Example error log when accessing the asset:

{"type":"response","@timestamp":"2020-11-15T00:33:16Z","tags":[],"pid":6,"method":"get","statusCode":404,"req":{"url":"/plugins/redelk/assets/redelklogo-light.svg","method":"get","headers":{"x-real-ip":"172.18.0.1","x-forwarded-for":"172.18.0.1","x-forwarded-proto":"https","x-forwarded-host":"localhost","x-forwarded-port":"443","connection":"upgrade","host":"localhost","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","sec-fetch-site":"none","sec-fetch-mode":"navigate","sec-fetch-dest":"document","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9"},"remoteAddress":"172.18.0.6","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"},"res":{"statusCode":404,"responseTime":26,"contentLength":9},"message":"GET /plugins/redelk/assets/redelklogo-light.svg 404 26ms - 9.0B"}

Any additional context: Plugin source code available at https://github.com/fastlorenzo/redelk-kibana-app

@fastlorenzo
Copy link
Author

Might be related to this line:

@fastlorenzo
Copy link
Author

Temporary workaround here: #75019 (comment)

@mshustov mshustov added the Team:Operations Team label for Operations Team label Nov 15, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants