Skip to content

[Draft] Authenticated Received Chain - ARC-sealing#31

Draft
agrinchenko wants to merge 96 commits intoapache:masterfrom
agrinchenko:master
Draft

[Draft] Authenticated Received Chain - ARC-sealing#31
agrinchenko wants to merge 96 commits intoapache:masterfrom
agrinchenko:master

Conversation

@agrinchenko
Copy link
Copy Markdown

Draft for ARC-sealing for review/comments/feedback. Work in progress.

mbaechler and others added 30 commits July 5, 2019 09:25
Fix FWS is not trimmed correctly
Following alphabetical order with groupId > artifactId
The JDKIM mailet has been moved into James server project
After removing the mailet (been moved to James), those libs are not necessary anymore.
@agrinchenko
Copy link
Copy Markdown
Author

Hey guys!

I committed changes with DMARC in a separate module and also implemented both strict and relaxed header checking against PSL list.

The Jenkins build fails though because MockPublicKeyRecordRetrieverDmarc test class that is in DMARC module is being used by test classes in the ARC module. It needs to build apache-dmarc-library-0.6-SNAPSHOT-tests.jar first so that ARC tests can find it. Tried changing a few things in POM, and they did not help. Will appreciate any suggestions. Works fine on my local.

@chibenwa
Copy link
Copy Markdown
Contributor

I have limited bandwith because of over-committing on another project.

I will take time for a complete review of this work this weekend.

@agrinchenko
Copy link
Copy Markdown
Author

Thanks, Benoit! No rush..

Copy link
Copy Markdown
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

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

I do think we could benefit from updating the documentation (src/site ?) for mentionning arc and dkim support + giving some little code examples.

I (tried to) refrain from doing too much code style related comments but I'd be happy, if you accept, to propose you a changeset to polish a bit this work (i'd PR your branch).


private PublicSuffixList() {}

public static boolean isPublicSuffix(String domain) {
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 PSL can't be used just to know if contains a suffix, it's missing exceptions and wildcard. Many valid domains will not be found.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I will take a closer look at PSL exceptions and wildcards, I think I just learned something new about PSL.

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.

Thanks for the feedback. I will take a closer look at PSL exceptions and wildcards, I think I just learned something new about PSL.

If you need, here is my library:

https://central.sonatype.com/artifact/dev.pinter.psl/publicsuffixlist

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks again, for the pointer to your lib! Nice work! I think it does actually more than what I need for the relaxed domain checking. I took another try at rewriting my initial PSL code to add ability to handle wildcards and exceptions. Checked in.

import static org.junit.Assert.assertTrue;

public class PublicSuffixListTest {

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.

If a PSL implementation is to be included here, I think a lot more tests will be needed. My implementation has more than 130 tests. A fail in PSL lookup can make invalid dmarc to pass.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good to know you have PSL implementation with 130 tests already! I would be glad to integrate with your work and delegate the relaxed org domain determination to your code. Let me know! Essentially I would need to be able to supply FQDN and receive either (1) a relaxed version of it (i.e. PSL public suffix + 1 part to the left of it) or (2) same FQDN if nothing is found in PSL.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Nice work you have on PSL! I think your library does more than what I need for the purposes of relaxed domain alignment. As a first step I rewrote initial PSL code I had to handle wildcards and exceptions, also added more test cases.

agrinchenko and others added 6 commits November 4, 2025 11:09
- Added ARC validation outcome with details on the failure
- Refactored logic such as `computeBTag` into separate methods
- Added hard fail whenever multiple From headers detected
- Rewrote tag extraction logic to do it all in one pass for efficiency
- Simplified getTimeMeasure to use standard Java
- Removed unnecessary Overrides
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.0 to 3.27.7.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](assertj/assertj@assertj-build-3.26.0...assertj-build-3.27.7)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.7
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Removed typos
chibenwa

This comment was marked as outdated.

@chibenwa
Copy link
Copy Markdown
Contributor

Last comnit in the README is nice.

I'll commit to do a review, likely next weekend. We shalll eventually merge this work upstream in james-jdkim.

@agrinchenko
Copy link
Copy Markdown
Author

Last comnit in the README is nice.

I'll commit to do a review, likely next weekend. We shalll eventually merge this work upstream in james-jdkim.

Thanks! Sorry for the delays; I've been going through some changes lately, but all is good now. Waiting on your review.

@ieugen ieugen changed the title First commit [Draft] Authenticated Received Chain - ARC-sealing Mar 30, 2026
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.

8 participants