Skip to content

VOLTTRON 9.3.0

Latest

Choose a tag to compare

@schandrika schandrika released this 03 Nov 02:03
a7af21c

Summary

Multiple web and auth security hardening, better weather agent cache handling, fixes for forwarder ZMQ reconnect issues. Please note the last section about possible impacts on existing clients/installations

Changes

Web API and authentication (#3408, #3416)

  • Adds DELETE /authenticate, which revokes the login session. It comes with a new token_revocation.py module.
  • Websocket sessions are tracked by session ID instead of decoding tokens without verifying them.
  • Each websocket is bounded by its access token.
  • Websocket subscriptions are released when the socket closes.
  • The platform holds one bus subscription per topic and releases it when the last socket for that topic closes.
  • If the revoked-sessions file is damaged, the platform now refuses requests instead of letting them through.
  • Malformed request input now gets a 400 or 401 response instead of a 500.
  • The length of login credentials is now bounded.
  • /discovery/allow requests are validated with explicit checks instead of asserts.
  • The server refuses to start if the configured TLS files are missing, and it stops cleanly on shutdown.
  • The DELETE /authenticate and pubsub endpoint docs are updated.

Certificates and CSR handling (#3408)

  • Malformed CSR requests now get an error response.
  • The CSR common name is sanitised before it is used to name pending_csr files.
  • The CSR error response helper is documented.

RabbitMQ

  • Wildcard permissions are granted only to federation link users.

Weather cache (#3228)

  • Cache management in base_weather.py no longer loops forever, and it commits transactions after deleting.
  • The used-pages calculation and the datetime generation are fixed.
  • "Cache full" is reported only when trimming fails, and trimming goes down to a low-water mark.
  • The bad status is released after the cache is cleared.
  • Cache table identifiers are quoted.
  • Status resets are scoped to their cause.

Core and VIP (#3410)

  • The build_agent core that was spawned when the connection timed out is now stopped.
  • The hello check is re-armed when the ZMQ socket disconnects.

Config store (#3411)

  • Config store get and get_metadata are now protected.

Tests and CI

  • New tests: test_token_revocation, test_web_service_stop, test_request_body, test_build_agent, test_base_weather_cache, plus additions to the existing web, cert, RMQ federation and pubsub tests.
  • The weather cache unit test now runs in the pytest-miscellaneous-tests.yml workflow.

Possible impact for existing volttron clients/installations

  • Clients of the websocket and pubsub API may notice the stricter token and session checks, the 400/401 responses and the credential length limit.
  • The server now fails to start without its TLS files, which could affect existing deployments that have a bad TLS configuration.