In SSI using Indy, how verifier chooses the schema for proof request? - aries

In a Self Sovereign Identity, when verifier sends a proof request to the holder of credential, how the verifier makes sure to use correct schema id that is related to the holder during the proof request to the holder?

I get more in depth and I can now say that the verifier can ask for a particular "schema_id" in the proof request's restrictions:(from here)
{
"name": "proof-schema1",
"version": "1.0",
"requested_attributes": [
{
"names": ["class", "grade"],
"restrictions": [{"cred_def_id": "<cred-def-id>"}]
},
{
"name": "phone_number"
}
],
"requested_predicates": [
{
"name": "rank",
"p_type": "<=",
"p_value": 10,
"restrictions": [{"cred_def_id": "<cred-def-id>"}]
}
],
"cred_filter": [
{
"attr_name": "class",
"attr_values": ["Math 100"]
"exclude": true
},
{
"attr_name": "class",
"attr_values": ["Math *"]
}
]
}

Related

property servicetoken cannot be empty

"certificatefordns":{
"Type" : "AWS::CertificateManager::Certificate",
"Properties" : {
"DomainName" : "*.test-elb.acb.com",
"ValidationMethod" : "DNS"
},
"CertificateDNSRecord":{
"Type": "Custom::CertificateDNSRecord",
"Properties": {
"CertificateArn": {
"Ref": "certificatefordns"
},
"DomainName": "*.test-elb.acb.com"
}},
"DNS": {
"Type": "AWS::Route53::RecordSetGroup",
"Properties": {
"HostedZoneId": "Z01724793QXGY7AZ",
"RecordSets": [
{
"Name": {
"Ref": "AlternateDomainNames"
},
"Type": "A",
"AliasTarget": {
"HostedZoneId": "Z23TAZ6MNIO",
"DNSName": {
"Fn::GetAtt": [
"WebLoadBalancer",
"DNSName"
]
}
}
},
{
"Name": {
"Fn::Sub": "${CertificateDNSRecord.Name}"
},
"Type": {
"Fn::Sub": "${CertificateDNSRecord.Type}"
},
"TTL": "60",
"Weight": 1,
"SetIdentifier": "*.test-elb.acb.com",
"ResourceRecords": [
{
"Fn::Sub": "${CertificateDNSRecord.Value}"
}
]
}
]
}
}
Hi Team,
I want to create a new certificate for Load balancer and with the help of this json code I am able to create that certificate but after some time it will through an error that property servicetoken cannot be empty So As i searched I am confused that I need to create lambda function or what?
Or Is there any other way to decline this error.
Please guide me into this.
Custom resources in CloudFormation require a ServiceToken:
The service token that was given to the template developer by the service provider to access the service, such as an Amazon SNS topic ARN or Lambda function ARN. The service token must be from the same region in which you are creating the stack.
Your Custom::CertificateDNSRecord is missing it. Thus you have to provide it.
If the custom resource is for validating ACM certifications, you can check the new option, which should not require custom lambda function:
AWS Certificate Manager Extends Automation of Certificate Issuance Via CloudFormation
Yes I got the solution own my own. We just need to use this template that's it.
"certificatefordns":{
"Type" : "AWS::CertificateManager::Certificate",
"Properties" : {
"DomainName" : "*.test-elb.acb.com",
"ValidationMethod" : "DNS",
"DomainValidationOptions": [
{
"DomainName": {
"Ref": "AlternateDomainNames"
},
"HostedZoneId": "Z01724793QXGL8FOZ"
}]
}
},
It will create a new certificate.

How can I create an activity for data conversion in Design Automation API?

I'm prototyping a web service to convert data using Design Automation API in Autodesk Forge.
My approach is to invoke an activity that executes a script to import a target data file (such as STEP, IGES format).
As an example, I created an activity to convert a STEP file to DWG as follows:
{
"HostApplication": "",
"RequiredEngineVersion": "22.0",
"Parameters": {
"InputParameters": [{
"Name": "Source",
"LocalFileName": "input.stp"
}, {
"Name": "HostDwg",
"LocalFileName": "$(HostDwg)"
}],
"OutputParameters": [{
"Name": "Result",
"LocalFileName": "output.dwg"
}]
},
"Instruction": {
"CommandLineParameters": null,
"Script": "import\ninput.stp\nsaveas\n\noutput.dwg\n"
},
"Version": 1,
"Id": "Step2Dwg"
}
The workitem to invoke this activity was executed without errors, but the output file (output.dwg) had nothing imported from the input file (input.stp).
Perhaps this is because some fields (e.g., AllowedChildProcess) were missing in the definition of the activity "Step2Dwg", but I do not know how to fix it.
My questions are:
How to fix the definition of the activity "Step2Dwg" to convert data successfully?
Is there any other approach to create an activity to convert data successfully?
You can use the Activity “Translate-STEP2DWG". It takes a .stp file as input and generate result.dwg as output. This is a public activity that anybody can send workitems against to it.
The activity is defined like this:
{
"Id": "Translate-STEP2DWG",
"AppPackages": [],
"HostApplication": "AcTranslators.exe",
"RequiredEngineVersion": "22.0",
"Parameters": {
"InputParameters": [
{
"Name": "HostDwg",
"LocalFileName": "source.stp"
}
],
"OutputParameters": [
{
"Name": "Result",
"LocalFileName": "result.dwg"
}
]
},
"Instruction": {
"CommandLineParameters": "-i source.stp -o result.dwg",
"Script": ""
},
"AllowedChildProcesses": [
],
"IsPublic": true,
"Version": 1,
"Description": ""
}
Here is a sample workitem request body:
{
"ActivityId": "Translate-STEP2DWG",
"Arguments": {
"InputArguments": [
{
"Resource": "https://s3.amazonaws.com/AutoCAD-Core-Engine-Services/TestDwg/3DStep.stp",
"Name": "HostDwg"
}
],
"OutputArguments": [
{
"Name": "Result",
"HttpVerb": "POST"
}
]
}
}

Fiware: NGSI v2 susbcription: getting notified only about the attribute that has changed

I have this subscription:
{
"id": "5a27abba56256c402cec5654",
"description": "my subscription",
"status": "active",
"subject": {
"entities": [
{
"idPattern": ".*"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 56939,
"lastNotification": "2018-01-29T09:06:45.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://notif_url"
},
"lastFailure": "2018-01-24T15:10:08.00Z",
"lastSuccess": "2018-01-29T09:06:45.00Z"
}
}
Using it I can get notified about new entities whithout specifiying a particular entity ID.
The problem is that when one entity attribute changes I get notified about all attributes.
Is it possible to get notified only about the attribute that has changed and keeping in the same time the possibility to discover new entities?
Something like in if attribut x changed in the condition part, get notified about it:
"condition": {
"attrs": [attribute_X]
}
"notification": {
"attrs": [attribute_X]
}
Thanks!
It works the way you mention. I mean, using:
"condition": {
"attrs": [ "attribute_X" ]
}
...
"notification": {
"attrs": [ "attribute_X" ]
}
Whenever attribute named attribute_X changes (or appears first time, typically at entity creation time) you will receive a notification including only attribute_X

How to add parameters to CFLint rule

I want to set specific parameters for the built-in CFLint rules using CFLint 1.2.3. Unfortunately, there is currently no clear description how to do that.
So I tried to set them in different ways within the configuration having a look at the project test files and the provided JSON schema:
As defined in one of the test files:
{
"rule" : [
{
"name": "VariableNameChecker",
"className": "VariableNameChecker",
"message": [
{
"code": "VAR_TOO_SHORT",
"severity": "INFO",
"messageText": "Variable ${variable} SHORTER THAN ${MinLength}!"
}
],
"parameter": [
{
"name": "MinLength",
"value": "5"
}
]
}
],
"inheritParent" : true
}
Within the rule object:
{
"rule": [ ],
"excludes": [ ],
"includes": [
{
"code": "VAR_TOO_SHORT",
{
"parameter": {
"MinLength": "5"
}
}
}
],
"inheritParent": false
}
As separate global property:
{
"rule": [ ],
"excludes": [ ],
"includes": [
{
"code": "VAR_TOO_SHORT",
}
],
"parameter": {
"MinLength": "5"
}
"inheritParent": false
}
I also tried different naming conventions as parameter name like VariableNameChecker.MinLength and also writing parameters instead of parameter, though without luck.
What is the correct syntax to specify the parameters?
The only ways to override a plugin param prior to CFLint 1.3.0 are
(1) replace the cflint.definition.json file with your own
(2) set a system property in the form ClassName DOT parameter. for example:
java -DVariableNameChecker.MinLength=5 cflint-1.2.3-all.jar -file
In CFLint 1.3.0 the following will work:
{
"parameters" : {
"VariableNameChecker.MinLength": "5"
}
}

Liferay API update Data with JSON

I am working on an API for my Portal, to provide users the ability to update there data via API directly from there internal Systems.
Liferay 6.2 bundle Tomcat. (for api call testing I use soapUI)
The get Methods work fine, (I have getAll, and getByID). getByID returns a JSON Object like this:
{
"ID": "ORGANIZATIONID",
"type": "ORGANIZATIONTYPE",
"name": "ORGANIZATIONNAME",
"URI": "ORGANIZATIONNAMEURI"
"date of inclusion": "INCLUTIONDATE",
"last activities": "LASTMODIFIEDDATE",
"address": {
"name of host institution": "NAMEOFHOSTINSTITUTE",
"street1": "STREET1",
"street2" : "STREET2",
"zip": "ZIP",
"city": "CITY",
"country": "COUNTRY",
},
"url": [{"ORGANIZATIONURL"}],
"main contact": {
"first name": "FIRSTNAME",
"last name" : "LASTNAME",
"phone": "PHONE",
"email": "MAINCONTACTEMAIL"
},
"type of host institution" : "TYPEOFHOSTINSTITUTE",
"diseases": [
{
"name": "DISEASENAME1",
"number": "SAMPLECOUNT",
"gene": "GENE",
"orphacode": "ORPHA"
"icd10": "ICD",
"omim": "OMIM";
"synonym": "SYNONYM"
},
{
"name": "DISEASENAME2",
"number": "SAMPLECOUNT",
"gene": "GENE",
"orphacode": "ORPHA"
"icd10": "ICD",
"omim": "OMIM";
"synonym": "SYNONYM"
}
]
}
I would like to have an API for Updating the diseases information for an organization. I have created a URL service where everything is in the url as parameters, but I would like to have it that the in the url only the id parameter is send and the rest of the information in a JSON object. Like:
/api/jsonws/....-portlet...../updateregbb/organization-id/16016/
and the data:
{
"ID": "ORGANIZATIONID",
"diseases": [
{
"name": "DISEASENAME1",
"number": "SAMPLECOUNT",
"gene": "GENE",
"orphacode": "ORPHA"
"icd10": "ICD",
"omim": "OMIM";
"synonym": "SYNONYM"
},
{
"name": "DISEASENAME2",
"number": "SAMPLECOUNT",
"gene": "GENE",
"orphacode": "ORPHA"
"icd10": "ICD",
"omim": "OMIM";
"synonym": "SYNONYM"
}
]
}
But I could not find a solution how I can read the JSON data:
#JSONWebService(value = "updateregbb", method = "POST")
public void updateregbb2(long organizationId, Map jsondata) {
#JSONWebService(value = "updateregbb", method = "POST")
public void updateregbb(long organizationId, JSONObject json) {
How can I get the Data into my function?
Thanks for the help,
Best
Robert