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

Add ActionCable infrastructure #100

Merged
merged 6 commits into from
Oct 12, 2020
Merged

Add ActionCable infrastructure #100

merged 6 commits into from
Oct 12, 2020

Conversation

mjgiarlo
Copy link
Member

@mjgiarlo mjgiarlo commented Oct 6, 2020

Fixes #17

Why was this change made?

To make sure Passenger standalone is working as expected, and to add dependencies and configuration we will need going forward.

Includes:

  • Set up authentication and user model
    • Install devise and devise-remote-user
    • Configure devise-remote-user
    • Generate user model via devise
    • Add Shibboleth middleware support including testing hooks
    • Create login controller per other Shibbolized projects
  • Restart passenger-standalone via capistrano-passenger configuration
  • Set up ActionCable for websockets using Redis
    • Use Redis as ActionCable adapter
    • Add Redis service to docker-compose
    • Mount ActionCable at same path in all environments
    • Configure ActionCable connections to be user-specific and to get user information from the session
    • Drop unused Railties (to tidy up routes)
    • Limit ActionCable request origins to H2/Hydrus URLs (security)
    • Enable ActionCable endpoint autodiscovery by H2 clients
  • Add notifications
    • Add a new ActiveRecord model for notifications
    • Generate notification support in ActionCable
    • Create an area in the UI to receive notifications
  • Tell GitHub to auto-collapse changes to Sorbet type definitions to make reviews less noisy

How was this change tested?

Tested in QA and CI.

@mjgiarlo mjgiarlo force-pushed the action-cable-test branch 17 times, most recently from f3fd317 to 3fdd945 Compare October 12, 2020 22:11
This work is done to support initial testing of ActionCable behind Passenger in
standalone mode and an Apache reverse proxy.

Includes:
* Install devise and devise-remote-user
* Configure devise-remote-user
* Generate user model via devise
* Add Shibboleth middleware support including testing hooks
* Create login controller per other Shibbolized projects
This work was done to support ActionCable-based notifications in the H2
application.

Includes:
* Use Redis as ActionCable adapter
* Add Redis service to docker-compose
* Mount ActionCable at same path in all environments
* Configure ActionCable connections to be user-specific and to get user information from the session
* Drop unused Railties (to tidy up routes)
* Limit ActionCable request origins to H2/Hydrus URLs (security)
* Enable ActionCable endpoint autodiscovery by H2 clients
This work is done to support end-user notifications via WebSockets

Includes:
* Add a new ActiveRecord model for notifications
* Generate notification support in ActionCable
* Create an area in the UI to receive notifications
@mjgiarlo mjgiarlo marked this pull request as ready for review October 12, 2020 22:16
@mjgiarlo mjgiarlo changed the title Test ActionCable infrastructure in deployed environment Add ActionCable infrastructure Oct 12, 2020
@jcoyne jcoyne merged commit 77b58fb into main Oct 12, 2020
@jcoyne jcoyne deleted the action-cable-test branch October 12, 2020 23:03
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.

Add devise, devise-remote-user, shibboleth support
2 participants