Hi All,

In order to design back-end component we have couple of suggestions.

1. Introduce separate module like
"org.wso2.carbon.identity.tools.xacml.validator" as we have done for SAML
tool (org.wso2.carbon.identity.tools.saml.validator). This will highly
depends on org.wso2.carbon.identity.entitlement module but this approach
will allow to install and uninstall as a separate tool feature.

2. Add org.wso2.carbon.identity.tools.xacml.validator as an another package
to org.wso2.carbon.identity.entitlement package. This will allow to keep
logically related code segments in a single module but limitation is cannot
install and uninstall as a separate feature.

WDYT?

>From the functionality perspective we have several concerns

1. Show list of all schema errors rather sending single first captured
parser error
This can be achieved with introducing custom error handler to XML schema
validator.

2. Show line number where the error is occurred.
Since back-end component receive policy content as String content there is
no way to identify line number. Is it advisable to write policy content to
temporary location of the server and get line numbers from there.

3. Show user friendly error messages.
By default error messages would be like

cvc-enumeration-valid: Value 'Permitt' is not facet-valid with respect to
enumeration '[Permit, Deny]'. It must be a value from the enumeration.

cvc-attribute.3: The value 'Permitt' of attribute 'Effect' on element
'Rule' is not valid with respect to its type, 'EffectType'.

cvc-complex-type.2.4.a: Invalid content was found starting with element
'Matchh'. One of '{"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":Match}'
is expected.

cvc-complex-type.2.4.a: Invalid content was found starting with element
'AttributeValuee'. One of
'{"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":AttributeValue}' is
expected.

cvc-complex-type.2.4.a: Invalid content was found starting with element
'Applyy'. One of
'{"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":Expression}' is expected.

cvc-complex-type.2.4.a: Invalid content was found starting with element
'Rulee'. One of
'{"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":CombinerParameters,
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":RuleCombinerParameters,
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":VariableDefinition,
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":Rule,
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":ObligationExpressions,
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17":AdviceExpressions}' is
expected.

Is there a way we can format these error messages in end-user friendly
manner ?




On Tue, Aug 12, 2014 at 11:30 AM, Dulanja Liyanage <[email protected]> wrote:

> IMHO it should be there under tools and also a button should be given in
> the policy editor to validate.
>
> Then a user can easily validate an external policy using this tool and
> also a user who's creating a policy can validate without navigating much.
>
>
> On Tue, Aug 12, 2014 at 10:45 AM, Selvaratnam Uthaiyashankar <
> [email protected]> wrote:
>
>> Shouldn't this policy validate go to policy editor? Why do we have it as
>> a separate link?
>>
>> For example, I am editing a policy in policy editor. Should I copy the
>> policy from there, click another link, paste there and validate? Isn't that
>> a major inconvenience?
>>
>> Regards,
>> Shankar
>>
>>
>> On Monday, August 11, 2014, Gayan Gunawardana <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I'm currently developing $subject which will help to do XACML schema
>>> validation before saving a policy. Current implementation schema validation
>>> happens just before saving a policy so that you will get to know validity
>>> of policy only when you try to save the policy and also you may need to
>>> check the validity of a policy without saving the policy.
>>>
>>>
>>> ​
>>>
>>>
>>>
>>> --
>>> Gayan Gunawardana
>>> Software Engineer; WSO2 Inc.; http://wso2.com/
>>> Email: [email protected]
>>> Mobile: +94 (71) 8020933
>>>
>>
>>
>> --
>> S.Uthaiyashankar
>> VP Engineering
>> WSO2 Inc.
>> http://wso2.com/ - "lean . enterprise . middleware"
>>
>> Phone: +94 714897591
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Dulanja Liyanage
> WSO2 Inc.
> M: +94776764717
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Gayan Gunawardana
Software Engineer; WSO2 Inc.; http://wso2.com/
Email: [email protected]
Mobile: +94 (71) 8020933
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to