balana icon indicating copy to clipboard operation
balana copied to clipboard

Error while running kmarket-trading

Open nishantm9 opened this issue 6 years ago • 2 comments

Description: I am running the run.bat command form the command line and I am getting MissingAttributeDetail error.

Jan 22, 2018 2:06:35 PM org.wso2.balana.finder.PolicyFinder findPolicy SEVERE: An error occured while trying to find a single applicable policy for a request: Couldn't find AttributeDesignator attribute

======================== XACML Response ===================

<Response xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"><Result><Decision>Indeterminate</Decision><Status><StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:missing-attribute"/><StatusMessage>Couldn't find AttributeDesignator attribute</StatusMessage><StatusDetail>
<MissingAttributeDetail AttributeId="http://kmarket.com/id/role" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" ></MissingAttributeDetail>
</StatusDetail></Status></Result></Response>

===========================================================

Can anyone tell me what am i doing wrong?

nishantm9 avatar Jan 22 '18 08:01 nishantm9

@nishantm9 -- I think this error is due to not entering in the appropriate name when the sample asks your name:

http://xacmlinfo.org/2012/08/16/xacml-sample-for-on-line-trading-application/


EDIT:

Never mind, looks like I am also receiving the same issue! I will look into this a bit more and see if I can figure it out.

cjones26 avatar Mar 29 '18 12:03 cjones26

Yes, this is definitely due to not entering a username as it's unable to find any role via the SampleAttributeFinderModule.java.

Try with the following inputs:

Enter User name : alice Enter Product Id : 2 Enter No of Products : 5

Which should net you a response like so:

<Response xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"><Result><Decision>Permit</Decision><Status><StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/></Status></Result></Response>

cjones26 avatar Mar 29 '18 19:03 cjones26