[jboss-jira] [JBoss JIRA] (ELY-1568) elytron-client-1.1.xsd xsd:all minOccurs="0"

Darran Lofthouse (JIRA) issues at jboss.org
Wed Apr 25 05:47:00 EDT 2018


    [ https://issues.jboss.org/browse/ELY-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566566#comment-13566566 ] 

Darran Lofthouse commented on ELY-1568:
---------------------------------------

+1 it does look like abstract-user-spec is missing a minOccurs.

In most cases it is easy to remember what the default minOccurs and maxOccurs values are if omitted as they default to the same value - as a maxOccurs of 0 would make no sense they both default to 1.  

The prior versions of this schema should also be checked as this is a bug in the schema not a compatibility change.

> elytron-client-1.1.xsd xsd:all minOccurs="0"
> --------------------------------------------
>
>                 Key: ELY-1568
>                 URL: https://issues.jboss.org/browse/ELY-1568
>             Project: WildFly Elytron
>          Issue Type: Bug
>          Components: Authentication Client, XML
>    Affects Versions: 1.3.0.Final
>            Reporter: Martin Choma
>
> I am getting error in my IDE during xml validation
> * {noformat}
> cvc-complex-type.2.4.b: The content of element 'providers' is not complete. One of '{"urn:elytron:client:1.1":global}' is expected.
> {noformat}
> While having this snippet in my wildfly-config.xml
> {code:xml|title=wildfly-config.xml}
> <providers>
>     <use-service-loader/>
> </providers>
> {code}
> * {noformat}
> cvc-complex-type.2.4.b: The content of element 'configuration' is not complete. One of '{"urn:elytron:client:
>  1.1":set-host, "urn:elytron:client:1.1":set-port, "urn:elytron:client:1.1":set-protocol, "urn:elytron:client:
>  1.1":abstract-user-spec, "urn:elytron:client:1.1":set-mechanism-realm, "urn:elytron:client:1.1":rewrite-user-
>  name-regex, "urn:elytron:client:1.1":set-mechanism-properties, "urn:elytron:client:1.1":set-authorization-
>  name, "urn:elytron:client:1.1":abstract-sasl-factories}' is expected.
> {noformat}
> While having this snippet in my wildfly-config.xml
> {code:xml|title=wildfly-config.xml}
>     <configuration name="default">
>         <sasl-mechanism-selector selector="EXTERNAL"/>
>         <credentials>
>             <key-store-reference key-store-name="keystore">
>                 <key-store-clear-password password="${password}"/>
>             </key-store-reference>
>         </credentials>
>         <providers>
>             <use-service-loader/>
>         </providers>
>     </configuration>
> {code}
> Based on [1] I think elements in xsd:all should contain minOccurs="0" explicitly. E.g. <xsd:element ref="abstract-user-spec" minOccurs="0"/>.
> I see this problem in providers-type and authentication-configuration-type -, key-pair-type and certificate-type-
> [1] https://www.w3schools.com/xml/el_all.asp



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list