Skip to content

Commit

Permalink
VH 1314 - Allow V2X-Hub Web UI browser access without self signed cer…
Browse files Browse the repository at this point in the history
…tificate warning acceptance (#622)

<!-- Thanks for the contribution, this is awesome. -->

# 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.

<!--- Describe your changes in detail -->

## Related Issue
[VH-1314](https://usdot-carma.atlassian.net/browse/VH-1314)
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## 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.
 
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] 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:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
[V2XHUB Contributing
Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.


[VH-1314]:
https://usdot-carma.atlassian.net/browse/VH-1314?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
DokurOmkar authored Jul 10, 2024
1 parent 8cb2838 commit 499e04e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@ 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).

### Access V2X-Hub
To access V2X-Hub UI, either chromium or google-chrome browser can be used by running the following commands:
```
chromium-browser --ignore-certificate-errors <v2xhub_ip>
```
or

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

> [!NOTE]
> V2X-Hub Server uses a secure WebSocket connection to communicate with the browser. For this, V2X-Hub Server uses a self-signed certificate instead of one signed by a trusted certificate authority (CA). Most of the browsers do not trust this until explicitly told to do so by navigating to 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 manual 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**.
3 changes: 1 addition & 2 deletions configuration/initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,4 @@ fi
cd "$mysqlDir" || return # return in case cd fails
./add_v2xhub_user.bash

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

0 comments on commit 499e04e

Please sign in to comment.