-
Notifications
You must be signed in to change notification settings - Fork 25
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
User is spammed with login prompts on chrome #379
Comments
@mmuzikar It could depend on the settings at the Jolokia containers side. Can you provide more info on your settings and if possible steps to reproduce the issue?
I believe it's not a issue. It's just that they are a probe request and failures are expected, but the Fetch API always writes erros to browser console and I couldn't find a way to suppress the negligible errors. |
I have the example app https://quay.io/repository/hawtio/hawtio-online-example-camel-springboot running on Openshift and running hawtio-online with yarn start:online and opening the website in Chrome. But the same behavior happens with hawtio-online normally running in the OCP cluster. I'm not aware of any changed settings. |
This is an issue in testing in dev-mode using
We do point out in the README that this does need to be done. |
Looking at this in terms of #354, I am adding better error handling & messaging to the Discover component. However, I looked to see if there was a way to disable this chrome login dialog and there is no good solution. Suggestions tend to be:
It is the combination of these that chrome decides is the reason to display the dialog. As a workaround, I am trying out an error count tracker for each pod which if it reaches a threshold will stop trying to probe the connection for changes. Not ideal but at least minimizes the number of dialogs to a more manageable number. However, this is only a workaround and not an ideal situation. |
If it's on OpenShift, generally we don't need to disable Jolokia authentication and aren't even recommended to do so.
Hmm, if it happens only with the new Hawtio Online v2 but not with the old v1, it's possible that I failed to port some subtle error handling code from hawtio-integration to hawtio-next: Just FYI, we've been also suffering a difficult issue of closed connection due to SSL handshake error on OpenShift: |
So made some progress... For Development EnvironmentIt is possible to add a proxy-response interceptor to the webpack-dev-server proxy config. This allows us to receive the response from the /master cluster and when it has a 401 status code, delete the For Production EnvironmentSince we also intercept the proxy responses in the nginx server using the nginx.js functions, I believe it possible we can perform the same approach in removing the Have successfully implemented the Dev Environment so will be trying to implement the Production Environment. |
In respect of your info regarding missing code, I think that is not the case. The management-service.ts is responsible for the popup dialogs and happens both on the Whereas the jolokia implementation, you cite above, appears to redirect away ( |
Adding couple of lines to the Tested in a full install of hawtio-online in OpenShift by removing the
|
* If a 401 http error is returned by jolokia/cluster then Chrome displays an authentication dialog, which is not required and disrupts the app. To stop the dialog appearing, the www-authentication header needs to be dropped from the http response. * webpack.config.dev.js * In dev mode, adding the onProxyRes property to the proxy-middleware allows the www-authenticate header to be removed. * nginx.js * In production mode, the response is already passed through the response function so detecting the status is 401, the www-authenticate header can be removed.
* If a 401 http error is returned by jolokia/cluster then Chrome displays an authentication dialog, which is not required and disrupts the app. To stop the dialog appearing, the www-authentication header needs to be dropped from the http response. * webpack.config.dev.js * In dev mode, adding the onProxyRes property to the proxy-middleware allows the www-authenticate header to be removed. * nginx.js * In production mode, the response is already passed through the response function so detecting the status is 401, the www-authenticate header can be removed.
* If a 401 http error is returned by jolokia/cluster then Chrome displays an authentication dialog, which is not required and disrupts the app. To stop the dialog appearing, the www-authentication header needs to be dropped from the http response. * webpack.config.dev.js * In dev mode, adding the onProxyRes property to the proxy-middleware allows the www-authenticate header to be removed. * nginx.js * In production mode, the response is already passed through the response function so detecting the status is 401, the www-authenticate header can be removed.
@phantomjinx Looks great. The only feedback I can make is that perhaps we could display the error messages in a better way. Now the Discover view seems to be getting more cluttering. We can consider using PF Alert or Notification and place it in a better position. Let's try to follow PF design guidelines as much as we can. |
Closing as fixed with #389 |
When Hawtio Online is making requests to the different jolokia containers, the requests get blocked with 403, which prompts users to put in username and password on chrome. This makes Hawtio Online basically unusable on chrome.
It might be related to some endpoints serving the index.html content, for example /keycloak/enabled or /auth/config both serve the HTML which fails on JSON parsing.
The text was updated successfully, but these errors were encountered: