Skip to content

fix(s7commplus): renew legacy session keys - #888

Closed
gijzelaerr wants to merge 2 commits into
fix/832-response-integrityfrom
fix/835-session-key-renewal
Closed

gijzelaerr wants to merge 2 commits into
fix/832-response-integrityfrom
fix/835-session-key-renewal

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Closes gijzelaerr/s7commplus#4

Summary

  • renew legacy SessionKeys every 25 minutes by default, with a configurable/disableable interval
  • serialize the challenge and SecurityKey exchange with application requests
  • keep the old key active through response-HMAC verification, then switch atomically
  • close the connection and surface a stable error when renewal fails
  • cancel renewal activity during disconnect and document the lifecycle

Testing

  • pre-commit run --all-files
  • uv run pytest -q --tb=short (2104 passed, 82 skipped)
  • uv build --quiet

Dependency

This is stacked on #884 because renewal must verify the PLC response with the old SessionKey before installing the new key.

@gijzelaerr

Copy link
Copy Markdown
Owner Author

This S7CommPlus work is now tracked in gijzelaerr/s7commplus#19. Pull requests cannot be transferred between repositories, so this PR is being closed in favor of the new-repository tracking issue.

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.

1 participant