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

Vault server UI does not work #14587

Closed
NLRemco opened this issue Mar 18, 2022 · 4 comments
Closed

Vault server UI does not work #14587

NLRemco opened this issue Mar 18, 2022 · 4 comments

Comments

@NLRemco
Copy link
Contributor

NLRemco commented Mar 18, 2022

Describe the bug
Whenever a Vault dev server instance is spawned, navigating to the UI does not work as the browser does not accept the presented scripts.
Navigating to the website will result in the following errors in the console:

127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8200/ui/assets/vendor-955807f07aa62cf6b124690f61829edf.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8200/ui/assets/vault-7e24f70a497a2e410d2aaedf982e8c75.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8200/ui/sw-registration-1b862bc1e33e4a8a41781d56c3469209.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Start a Vault server instance. vault server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8200 or vault server -config=config.hcl
  2. Open your browser.
  3. Navigate to http://127.0.0.1:8200/ui

Expected behavior
The Vault server returns JavaScript files with the correct Content/MIME Type. Now the browser can securely execute said files.

Environment:

  • Vault Server Version (retrieve with vault status): v1.9.x (any version above 1.8.9)
  • Vault CLI Version (retrieve with vault version): Vault v1.9.4 (fcbe948b2542a13ee8036ad07dd8ebf8554f56cb), Vault v1.9.0
  • Server Operating System/Architecture: Windows 10.0.19044 Build 19044

Additional Context:
Does not seem to happen on Docker version. Tested on Linux (Ubuntu 20.04.4 and Manjaro), seems to work fine.

@NLRemco NLRemco changed the title Vault Dev server UI does not work Vault server UI does not work Mar 18, 2022
@Inveracity
Copy link

seems related #13357

@aphorise
Copy link
Contributor

aphorise commented Sep 4, 2022

golang/go#32350

Given then above merger - this issue will likely resolve as and when Vault adopts go 1.9.x which may be likely by Vault 1.13.x in 2023 (current track for core: Bump Go version to 1.18.5 in Vault 1.12.0).

Hey @RemcoBuddelmeijer meanwhile you may wish to refer to #13357 for more details and potential work-around solutions.

@zofskeez
Copy link
Contributor

Closing since a fix was added to Go 1.19 and the issue should be resolved in Vault version >= 1.11.7

@AtiwadkarAjinkya
Copy link

Hi,
I am facing this issue for below version
Vault v1.17.3

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

No branches or pull requests

6 participants