Skip to content

ASN Hex 1609.2 Signature Retention (ITSA)#596

Merged
Michael7371 merged 17 commits into
developfrom
fix/retain-asn1-message-signature
Jun 2, 2026
Merged

ASN Hex 1609.2 Signature Retention (ITSA)#596
Michael7371 merged 17 commits into
developfrom
fix/retain-asn1-message-signature

Conversation

@Michael7371

@Michael7371 Michael7371 commented May 8, 2026

Copy link
Copy Markdown
Contributor

PR Details

Description

  • Adding signature retention to metadata.asn1 field before stripping signature header off for decoding.
  • Update to the outdated TMC ODE diagram based off of ODE development updates. Added additional modules and removed outdated modules.

Related Issue

N/A

Motivation and Context

Updates to the ODE that are required for the ITSA direct -> network V2X exchange work.

How Has This Been Tested?

  • Unit test verification
  • Deployment to ITSA VM and live testing with RSU data and verifying that signatures are retained in output messages.

Types of changes

  • 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:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    ODE Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ctor UdpHexDecoder to extract and log untrimmed payload hex
….1 strings end with expected values across multiple receiver test classes.
Comment thread jpo-ode-core/src/main/java/us/dot/its/jpo/ode/model/OdeMsgMetadata.java Outdated
Comment thread jpo-ode-core/src/main/java/us/dot/its/jpo/ode/model/OdeMsgMetadata.java Outdated
Comment thread jpo-ode-core/src/main/java/us/dot/its/jpo/ode/model/OdeMsgMetadata.java Outdated
…o-commit interval and add fetch-max-wait, retries, and linger.ms properties.
…type and improve packet description for troubleshooting.
@Michael7371 Michael7371 requested a review from iyourshaw May 12, 2026 17:12
@Michael7371 Michael7371 mentioned this pull request May 12, 2026
12 tasks
@@ -1,16 +1,14 @@
/*******************************************************************************
* Copyright 2018 572682

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Year needs to be updated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: also the copyright holder is named USDOT not 572682

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dan-du-car @iyourshaw I agree with these comments, but the cause of this issue is out of scope for this PR. A complete solution to the issue being raised would require a standalone PR to address across the codebase.
I will update this PR to remove the autoformatting changes to these sections, but don't plan to address this problem in this PR.

@Michael7371 Michael7371 May 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dan-du-car same response as in this comment

int off = packet.getOffset();
byte[] data = packet.getData();
// int end = Math.min(off + len, data.length);
// int actualLen = Math.max(0, end - off);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove commented out code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is resolved now.

consumer:
enable-auto-commit: true
auto-commit-interval: 1000
auto-commit-interval: 100

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can this interval be configurable? Is 100 the best choice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was for optimizing message latency and I agree that it should be configurable. I will have it take KAFKA_AUTO_COMMIT_INTERVAL as and environmental override and default back to the previous value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update readme or other document that describe (including feature, purpose, interface etc) the modules in the architecture diagram. If the module codebase exist, please add link to the codebase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dan-du-car

dan-du-car commented May 12, 2026

Copy link
Copy Markdown
Contributor

@Michael7371 "Adding signature retention to metadata.asn1 field before stripping signature header off for decoding." I see the asn1 field is populated in the metadata, but where the signature retention logic is added?

Comment thread jpo-ode-svcs/src/main/resources/application.yaml Outdated
… to include KAFKA_AUTO_COMMIT_INTERVAL environment variable; enhance README with architecture module reference and improve documentation structure in Architecture.md.
…ove error logging for header stripping failures. Update multiple receiver tests to remove assertions on ASN.1 string endings, ensuring consistency across test cases.
…ngs in JSON output. Update tests to validate that metadata matches CodecUtils serialization, enhancing reliability across various message types.
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/UdpHexDecoder.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/UdpHexDecoder.java Outdated
@Michael7371

Copy link
Copy Markdown
Contributor Author

@Michael7371 "Adding signature retention to metadata.asn1 field before stripping signature header off for decoding." I see the asn1 field is populated in the metadata, but where the signature retention logic is added?

The signature retention logic is added to the UdpHexDecoder's buildAsn1DataFromPacket function as it now returns a stripped asn1 hex string for the payload data but it retains the full IEE 1609.2 signature header and message frame payload in the metadata.asn1 field. Note that this does require the incoming UDP data to include the message signature when the UDP IFM is configured.

@iyourshaw iyourshaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The updates look good.

Just noticed an issue with the unit tests that is important, plus a few nitpicks.

Comment thread jpo-ode-core/src/main/java/us/dot/its/jpo/ode/model/OdeLogMetadata.java Outdated
Comment thread jpo-ode-core/src/main/java/us/dot/its/jpo/ode/model/OdeMsgMetadata.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/generic/GenericReceiver.java Outdated
…c OdeMsgPayload type. Update multiple receiver tests to utilize parameterized tests for improved readability and maintainability, ensuring consistent setup and teardown processes across test classes. Reverting default UDP receiver tests to use unsigned messaging. Added additional tests with signed messages.
…MP header" across multiple test classes for consistency. Refactor test input formatting for improved readability. Adjust test files to ensure proper newline endings and correct expected output values.
…ues and ensure proper newline endings. Remove unnecessary commas in JSON validation file for cleaner formatting.
@@ -1 +1 @@
0022e12d18466c65c1493800000e00e4616183e85a8f0100c000038081bc001480b8494c4c950cd8cde6e9651116579f22a424dd78fffff00761e4fd7eb7d07f7fff80005f11d1020214c1c0ffc7c016aff4017a0ff65403b0fd204c20ffccc04f8fe40c420ffe6404cefe60e9a10133408fcfde1438103ab4138f00e1eec1048ec160103e237410445c171104e26bc103dc4154305c2c84103b1c1c8f0a82f42103f34262d1123198103dac25fb12034ce10381c259f12038ca103574251b10e3b2210324c23ad0f23d8efffe0000209340d10000004264bf00 No newline at end of file
001480b8494c4c950cd8cde6e9651116579f22a424dd78fffff00761e4fd7eb7d07f7fff80005f11d1020214c1c0ffc7c016aff4017a0ff65403b0fd204c20ffccc04f8fe40c420ffe6404cefe60e9a10133408fcfde1438103ab4138f00e1eec1048ec160103e237410445c171104e26bc103dc4154305c2c84103b1c1c8f0a82f42103f34262d1123198103dac25fb12034ce10381c259f12038ca103574251b10e3b2210324c23ad0f23d8efffe0000209340d10000004264bf00 No newline at end of file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed the message signature on this sample payload

@@ -1 +1 @@
011d0000201a0000021bd86891de75f84da101c13f042e2214141fff00022c2000270000000163b2cc7986010000 No newline at end of file
00201a0000021bd86891de75f84da101c13f042e2214141fff00022c2000270000000163b2cc7986010000 No newline at end of file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same payload with removed message signature.

…l test methods for improved clarity and maintainability. Update test input handling and ensure consistent formatting across all receiver test classes.
@Michael7371 Michael7371 requested a review from iyourshaw May 19, 2026 00:46
@Michael7371 Michael7371 requested a review from iyourshaw May 20, 2026 19:05

@iyourshaw iyourshaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good, issues have been addressed & verified unit tests pass

@Michael7371 Michael7371 requested review from CCastillo027 and removed request for dan-du-car and moha-hafez May 27, 2026 15:19
@Michael7371 Michael7371 merged commit 5d3f2c7 into develop Jun 2, 2026
5 checks passed
@Michael7371 Michael7371 deleted the fix/retain-asn1-message-signature branch June 2, 2026 16:23
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.

4 participants