Re: [dmarc-ietf] DMARC aggregate reports XML Schema inconsistencies

"Freddie Leeman" <freddie@leemankuiper.nl> Tue, 06 August 2019 22:05 UTC

Return-Path: <freddie@leemankuiper.nl>
X-Original-To: dmarc@ietfa.amsl.com
Delivered-To: dmarc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3DED8120289 for <dmarc@ietfa.amsl.com>; Tue, 6 Aug 2019 15:05:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=leemankuiper.nl
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SUkXKylwPCRS for <dmarc@ietfa.amsl.com>; Tue, 6 Aug 2019 15:05:56 -0700 (PDT)
Received: from srv01.leeman-automatisering.nl (srv01.leeman-automatisering.nl [87.239.9.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 364071200BA for <dmarc@ietf.org>; Tue, 6 Aug 2019 15:05:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=leemankuiper.nl; s=mta1; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nL7eEfV2+KSK6K4Pq2z+YKURPxrcycCEvIUfusLbg9Q=; b=k/HVGO9BSELoRu0qih41C4CMNx iP1DCquN1px32CKnsuWqC0Yims3Yw2Gn0CR30ztltzPnlIBH2TGEqnDumd7652u9mj/MgNZNMpvVR XTjAuSHAZKkJGuofv5odNmtSLl4kBB83f7nwO4Ro+g6N6tZyfB0Gs/ufUwN7d438EkQykMiN6qPXL X08+VNFyVDVjfepU9oAIzfmvhrcVfLZHK3jl9piMECz/D3KL6vtIe9nHlMFKFQiXwp3CXQvyhod3p vYou5ifTEKRhgvykoq9rN4wZr/FEIU3hBrsaYcefxsu68STzBHfHzDO4ua3/FyUXnIq9epLbT8HpT bjAck9hQ==;
Received: from 83-85-239-134.cable.dynamic.v4.ziggo.nl ([83.85.239.134] helo=LAPC01) by srv01.leeman-automatisering.nl with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.1) (envelope-from <freddie@leemankuiper.nl>) id 1hv7ac-0007Ac-27; Wed, 07 Aug 2019 00:05:54 +0200
From: "Freddie Leeman" <freddie@leemankuiper.nl>
To: "'Alessandro Vesely'" <vesely@tana.it>, <dmarc@ietf.org>
References: <008401d54784$f8300750$e89015f0$@leemankuiper.nl> <e1fa3716-39b0-4de5-99df-10ed6fd91724@tana.it>
In-Reply-To: <e1fa3716-39b0-4de5-99df-10ed6fd91724@tana.it>
Date: Wed, 7 Aug 2019 00:05:52 +0200
Message-ID: <00b101d54ca3$1d388040$57a980c0$@leemankuiper.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQEwMtDJj/TREh0OevgSswABly9FJAFy9+IqqC1FHHA=
Content-Language: nl
X-Antivirus-Scanner: Clean mail though you should still use an Antivirus
X-Authenticated-Id: info@leemankuiper.nl
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/bfc2UAJ7LfWRgdykTlm4E6_87Ew>
Subject: Re: [dmarc-ietf] DMARC aggregate reports XML Schema inconsistencies
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Domain-based Message Authentication, Reporting, and Compliance \(DMARC\)" <dmarc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dmarc>, <mailto:dmarc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dmarc/>
List-Post: <mailto:dmarc@ietf.org>
List-Help: <mailto:dmarc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dmarc>, <mailto:dmarc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Aug 2019 22:06:04 -0000

Great!... more inconsistencies. The xsd file does not make things better. It
also does not mention 'envelope_from', spf scope, and parent version. I
understand now why so many organizations have a different implementation of
DMARC aggregate reporting. I think we can all agree this is a mess we need
to fix. I don't believe the namespaces and schema locations are the biggest
issues but the RFC should be clear about that to. Thanks for bringing the
xsd to my attention.

-- Freddie Leeman

-----Oorspronkelijk bericht-----
Van: Alessandro Vesely [mailto:vesely@tana.it] 
Verzonden: dinsdag 6 augustus 2019 19:37
Aan: dmarc@ietf.org
Onderwerp: Re: [dmarc-ietf] DMARC aggregate reports XML Schema
inconsistencies

On Wed 31/Jul/2019 11:47:29 +0200 Freddie Leeman wrote:
> [...]
> 
> DMARC reporting capabilities are a valuable aspect of the DMARC 
> mechanism. It can help domain owners in setting up and hardening their
DKIM/SPF/DMARC policy.
> But unless these reports follow strict guidelines they just pile up to 
> a lot of inconsistent data open to interpretation and guesswork. 
> Domain owners should be able to understand the data without the need 
> for a spiritual voodoo DMARC guru (trademark pending) to make sense of it
all.


I had tried and programmed carefully, but never formally checked what I was
sending.  Too bad.  Now that I did, I see my reports miss the <pct> and
<fo>[*] elements, and some other nuisance.

However, the most striking difference is that, after some tinkering, to be
able to formally validate a report, it has to be rewritten like so:

    <?xml version="1.0" encoding="UTF-8"?>
    <dmarc:feedback xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:dmarc="http://dmarc.org/dmarc-xml/0.1"
        xs:schemaLocation="http://dmarc.org/dmarc-xml/0.1 rua.xsd">
        <report_metadata>
            <org_name>example.com</org_name>
            <email>postmaster@example.com</email>;
            [...]

Is that correct?  Is that how reports should be written?  I ask because
checking some aggregate report I received, I found no mention of namespaces
and schema locations.  XSLT works well even without those.  Validation
doesn't.

What do you reckon?


Best
Ale

--
[*] <fo> is present in Appendix C of the spec, but not in
https://dmarc.org/dmarc-xml/0.1/rua.xsd