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

Feature/websockets ssl #34

Merged
merged 7 commits into from
Jun 16, 2020
Merged

Feature/websockets ssl #34

merged 7 commits into from
Jun 16, 2020

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Jun 12, 2020

Adds SSL support to the websocket server.

To test:

  1. Uncomment the <ssl> section in examples/websocket.ign. Set the <cert_file> to contain the full path to the plugins/websocket_server/localhost.cert file. Set the <private_key_file> to contain the full path to the plugins/websocket_server/localhost.key file.

  2. Run gazebo: ign gazebo -v 4 -r -s shapes.sdf

  3. Run the websocket server: ign launch examples/websocket.ign -v 4.

  4. Run: firefox plugins/websocket_server/index.hml.

  5. Open a new tab in firefox and go to https://localhost:9002. Accept the certificate.

  6. Go back to the index.hml tab, and refresh.

Nate Koenig added 3 commits June 11, 2020 13:03
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
@github-actions github-actions bot added the 📜 blueprint Ignition Blueprint label Jun 12, 2020
Nate Koenig added 2 commits June 12, 2020 12:06
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

Merging #34 into ign-launch1 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           ign-launch1      #34   +/-   ##
============================================
  Coverage        28.15%   28.15%           
============================================
  Files                3        3           
  Lines              721      721           
============================================
  Hits               203      203           
  Misses             518      518           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31a423a...3273662. Read the comment docs.

plugins/websocket_server/WebsocketServer.cc Outdated Show resolved Hide resolved
var ign = new Ignition({
url: 'ws://localhost:9002',
url: 'wss://localhost:9002',
key: "auth_key"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the auth key the websocket server expects to receive? Maybe this should be noted in the docs.

This repo does not have the ign.js code in it (and rightly so). Where can I read its source?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had put the authorization documentation here: https://github.com/ignitionrobotics/ign-launch/blob/feature/websockets_ssl/plugins/websocket_server/WebsocketServer.hh#L45. I think yout are looking for it in the README.md, which I'll update.

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 readme: 3273662

Nate Koenig added 2 commits June 15, 2020 08:54
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Copy link
Contributor

@german-e-mas german-e-mas left a comment

Choose a reason for hiding this comment

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

LGTM. It's working locally.

@nkoenig nkoenig merged commit 2660b2c into ign-launch1 Jun 16, 2020
@nkoenig nkoenig deleted the feature/websockets_ssl branch June 16, 2020 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 blueprint Ignition Blueprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants