[dmarc-ietf] RUA XML : maxOccurs="unbounded" not allowed

OLIVIER HUREAU <olivier.hureau@univ-grenoble-alpes.fr> Tue, 02 April 2024 16:42 UTC

Return-Path: <olivier.hureau@univ-grenoble-alpes.fr>
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 CFA2BC14CEF9 for <dmarc@ietfa.amsl.com>; Tue, 2 Apr 2024 09:42:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.093
X-Spam-Level:
X-Spam-Status: No, score=-2.093 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=univ-grenoble-alpes.fr
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tHtujflGEVcG for <dmarc@ietfa.amsl.com>; Tue, 2 Apr 2024 09:42:27 -0700 (PDT)
Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E0C1FC14CE25 for <dmarc@ietf.org>; Tue, 2 Apr 2024 09:41:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=univ-grenoble-alpes.fr; s=2020; t=1712076102; bh=8CxW7Mv1V7AUXMgNwj3qztJ1T5xXCGC9GiZeoXmA7fM=; h=Date:From:To:Subject:From; b=oq8RaDp2a/tvyUSJCuGxNnpVxiKwSbaNCtiEaNWCcch/6UD5otRRzJbaivOfbDvDO cKbvYVN7+Ypvvrz7I8pauSL37yjpinNL7oPJQGDQ0ozWAIwka7q3zijU7hBsoAGvGz 4MuMM2S5B4BMREN16zNSd4IA05ai5+EyF+LsyDC1qMMAzMKFv6ro0XHK/6c6PX19qI ukVqQv4NagXVi1GKkJSs62/YjFlp9Atx+62FTUxyOuf+mHMzIncQ1yfaplyDMJi651 C/1qNBgsVR/PKfT4cd9tCCCBhi3CHc7kVgsquX6I5QUCmhaidw4QKk9m36Ipt75P7r BhTjdO4+PIMXg==
Received: from mailhub.u-ga.fr (mailhub-1.u-ga.fr [129.88.178.98]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id BCBF340299 for <dmarc@ietf.org>; Tue, 2 Apr 2024 18:41:42 +0200 (CEST)
Received: from mailhost.u-ga.fr (mailhost1.u-ga.fr [152.77.1.10]) by mailhub.u-ga.fr (Postfix) with ESMTP id BC7F7100054 for <dmarc@ietf.org>; Tue, 2 Apr 2024 18:41:50 +0200 (CEST)
Received: from zm-mbx10.u-ga.fr (zm-mbx10.u-ga.fr [152.77.200.34]) by mailhost.u-ga.fr (Postfix) with ESMTP id B98716005C for <dmarc@ietf.org>; Tue, 2 Apr 2024 18:41:50 +0200 (CEST)
Date: Tue, 02 Apr 2024 18:41:50 +0200
From: OLIVIER HUREAU <olivier.hureau@univ-grenoble-alpes.fr>
To: dmarc <dmarc@ietf.org>
Message-ID: <1663413255.6490632.1712076110725.JavaMail.zimbra@univ-grenoble-alpes.fr>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_fc35fe95-283c-4ce9-9c69-a97863f80851"
X-Originating-IP: [129.88.52.186]
X-Mailer: Zimbra 10.0.7_GA_4598 (ZimbraWebClient - GC119 (Linux)/10.0.7_GA_4598)
Thread-Index: JYwWqrHWqCy8hXSJawNEcjW9kn/oXA==
Thread-Topic: RUA XML : maxOccurs="unbounded" not allowed
X-Greylist: Whitelist-UGA MAILHOST (SMTP non authentifie) depuis 152.77.200.34
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/E6Q8Gj4wawxI8acSHu6R2YVQKbs>
Subject: [dmarc-ietf] RUA XML : maxOccurs="unbounded" not allowed
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.39
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, 02 Apr 2024 16:42:31 -0000

Hi, 

I have tried to run some measurements with the new XSD but it seems that it is not valid : 

``` 
xmlschema.validators.exceptions.XMLSchemaParseError: attribute maxOccurs='unbounded': value must be one of [0, 1]: 
``` 

The complex type "ReportMetadataType" has a <xs:all> (see below). 
However the Python library i am using refuses the XSD files as, according to W3, macOccurs unbounded are not accepted in all : 

``` 
Schema Component Constraint: All Group Limited 
When a model group has {compositor} all, then all of the following must be true: 
1 It appears only as the value of one or both of the following properties: 
1.1 the {model group} property of a model group definition. 
1.2 the {term} property of a particle with {max occurs}=1which is part of a pair which constitutes the {content type} of a complex type definition. 
2 The {max occurs} of all the particles in the {particles} of the group must be 0 or 1. 
``` 
[ https://www.w3.org/TR/xmlschema-1/#cos-all-limited | https://www.w3.org/TR/xmlschema-1/#cos-all-limited ] [ https://www.w3.org/TR/xmlschema-1/#cos-all-limited ] 

Shouldn't we remove the maxOccurs for the error element ? 


------ 


OLD 
``` 
<xs:complexType name="ReportMetadataType"> 
<xs:all> 
<xs:element name="org_name" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="email" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="extra_contact_info" type="xs:string" 
minOccurs="0" maxOccurs="1"/> 
<xs:element name="report_id" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="date_range" type="DateRangeType" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="error" type="xs:string" 
minOccurs="0" maxOccurs="unbounded"/> 
</xs:all> 
</xs:complexType> 
``` 



NEW 
``` 
<xs:complexType name="ReportMetadataType"> 
<xs:all> 
<xs:element name="org_name" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="email" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="extra_contact_info" type="xs:string" 
minOccurs="0" maxOccurs="1"/> 
<xs:element name="report_id" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="date_range" type="DateRangeType" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="error" type="xs:string" 
minOccurs="0"/> 
</xs:all> 
</xs:complexType> 
``` 





------------------------------------------------- 
Olivier HUREAU 
PhD Student 
Laboratoire Informatique Grenoble - UGA - Drakkar 
[ https://hureau.com/ | hureau.com ]