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

VH 1314 - Allow V2X-Hub Web UI browser access without self signed certificate warning acceptance #622

Conversation

DokurOmkar
Copy link
Contributor

@DokurOmkar DokurOmkar commented Jul 9, 2024

PR Details

Description

In this PR, initialization script is updated to ignore the certificates for localhost on google chrome and chromium browsers to remove the manual step of navigating to websocket URL and accepting self signed certificate. This will allow to access V2X-Hub Web UI without accepting the risk in an other tab.

Related Issue

VH-1314

Motivation and Context

How Has This Been Tested?

This has been tested locally by running the initialization script and making sure that the web page opens with the login screen.

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    V2XHUB Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@paulbourelly999
Copy link
Contributor

Please make sure the PR describes the manual step we are removing in the description. "updated to ignore the certificates for localhost on google chrome and chromium browsers to remove the manual step" (navigating to websocket URL and accepting self signed certificate.

@@ -150,3 +150,5 @@ cd "$mysqlDir" || return # return in case cd fails

chromium-browser "http://127.0.0.1" > /dev/null 2>&1 &
chromium-browser "https://127.0.0.1:19760" > /dev/null 2>&1 &
google-chrome --ignore-certificate-errors localhost
chromium-browser --ignore-certificate-errors localhost
Copy link
Contributor

Choose a reason for hiding this comment

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

We only need one browser and we also no longer need the "https://127.0.0.1:19760" tab right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's true. I have removed these lines from the script now:

chromium-browser "http://127.0.0.1" > /dev/null 2>&1 &
chromium-browser "https://127.0.0.1:19760" > /dev/null 2>&1 &

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

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

Left some comments.

@DokurOmkar
Copy link
Contributor Author

Left some comments.

Addressed all the comments

@@ -59,3 +59,9 @@ To support execution in a simulated environment, V2X-Hub is in the process of in
* **V2XHUB_IP** – Environment variable for storing IP address of V2X Hub.
* **INFRASTRUCTURE_ID** – Environment variable for storing infrastructure id of V2X Hub.
* **SENSOR_JSON_FILE_PATH** – Environment variable for storing path to sensor configuration file. This is an optional simulation environment variable that allows for setting up simulated sensor for a V2X-Hub instance. Example file can be found in the **CDASimAdapterPlugin** tests [here](../src/v2i-hub/CDASimAdapter/test/sensors.json).

### Open V2X-Hub in Google Chrome
To open V2X-Hub in Google Chrome, run this command:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the wrong command since we use chromium below. We can offer this as an option of the user has google chrome instead of chromium. A note explaining why we do this may be useful. Something link

Note

V2X-Hub Server uses a secure WebSocket connection to communicate with the browser. V2X-Hub Server uses a self-signed certificate instead of one signed by a trust certificate authority (CA) for this secure connection, which most browsers will not trust until explicitly told to do so by navigating the the WebSocket URL (https://<v2xhub_ip>:19760) and accepting the risk . The --ignore-certificate-errors option instructs the browser to ignore certificate errors and warnings which removes manually effort of accepting this risk on V2X-Hub deployments. Using the browser with this option enabled to access the internet or any other application is not advised as it is a security risk

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

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

Requested more changes

@DokurOmkar
Copy link
Contributor Author

Requested more changes

Addressed all the comments.

@@ -59,3 +59,12 @@ To support execution in a simulated environment, V2X-Hub is in the process of in
* **V2XHUB_IP** – Environment variable for storing IP address of V2X Hub.
* **INFRASTRUCTURE_ID** – Environment variable for storing infrastructure id of V2X Hub.
* **SENSOR_JSON_FILE_PATH** – Environment variable for storing path to sensor configuration file. This is an optional simulation environment variable that allows for setting up simulated sensor for a V2X-Hub instance. Example file can be found in the **CDASimAdapterPlugin** tests [here](../src/v2i-hub/CDASimAdapter/test/sensors.json).

### Open V2X-Hub in Google Chrome
If the chromium browser is not available, run this command to open V2X-Hub in google chrome:
Copy link
Contributor

@paulbourelly999 paulbourelly999 Jul 10, 2024

Choose a reason for hiding this comment

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

To access V2X-Hub Admin Web UI from a different machine on the same network please use either chromium or google-chrome browser and run the following command

chromium --ignore-certificate-errors <v2xhub_ip>

or

google-chrome --ignore-certificate-errors <v2xhub_ip>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the README file.

Copy link

sonarcloud bot commented Jul 10, 2024

@paulbourelly999 paulbourelly999 merged commit 499e04e into develop Jul 10, 2024
2 of 3 checks passed
@paulbourelly999 paulbourelly999 deleted the vh-1314_allow_v2xhub_web_ui_browser_access_without_warning branch July 10, 2024 20:12
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.

3 participants