Skip to content
Snippets Groups Projects
Verified Commit 808eb511 authored by Georgi Michev's avatar Georgi Michev
Browse files

Add Call of external URLs

parent 73749f61
No related branches found
No related tags found
1 merge request!56Add validate policy output by JSON schema tests
Pipeline #68871 passed
...@@ -35,6 +35,20 @@ Feature: API -TSA - Policy - {repository}/{group}/{name}/{version}/evaluation PO ...@@ -35,6 +35,20 @@ Feature: API -TSA - Policy - {repository}/{group}/{name}/{version}/evaluation PO
Then the status code should be {200} Then the status code should be {200}
And the field {key} has the value {someValue} And the field {key} has the value {someValue}
@phase2 @IDM.TSA.E1.00013
Scenario: TSA - Calling external URL - Positive
When I execute the Policy group {example} name {externalURL} version {1.0} via TSA Policy API
Then the status code should be {200}
And the field {body.service} has the value {policy}
And the field {body.status} has the value {up}
And the field {status} has the value {200 OK}
@phase2 @IDM.TSA.E1.00013
Scenario: TSA - DID resolution using external URL - Positive
When I execute the Policy group {example} name {externalURL} version {1.1} via TSA Policy API
Then the status code should be {200}
And the field {body.data.didDocument.id} has the value {did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6}
Scenario: TSA - using multiple header values for policy execution - Positive Scenario: TSA - using multiple header values for policy execution - Positive
When I load the REST request {Policy.json} with profile {empty} When I load the REST request {Policy.json} with profile {empty}
And I load value {someValue} into current request HEADER {X-Cache-Key} And I load value {someValue} into current request HEADER {X-Cache-Key}
......
#Copyright (c) 2023 Vereign AG [https://www.vereign.com] #Copyright (c) 2023 Vereign AG [https://www.vereign.com]
@rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @IDM.TSA.E1.00011
Feature: API - TSA - policy - {repository}/{group}/{name}/{version}/export GET Feature: API - TSA - policy - {repository}/{group}/{name}/{version}/export GET
As user As user
I want to be able to export policy I want to be able to export policy
......
...@@ -506,5 +506,31 @@ ...@@ -506,5 +506,31 @@
"dataConfig": "{\n \"url\": \"http://example.com/data.json?page=3\",\n \"method\": \"GET\",\n \"period\": \"10h\",\n \"body\": {\n \"key\": \"value\"\n }\n}\n", "dataConfig": "{\n \"url\": \"http://example.com/data.json?page=3\",\n \"method\": \"GET\",\n \"period\": \"10h\",\n \"body\": {\n \"key\": \"value\"\n }\n}\n",
"exportConfig": "{\n\t\"namespace\":\"transit\",\n\t\"key\":\"key1\"\n}", "exportConfig": "{\n\t\"namespace\":\"transit\",\n\t\"key\":\"key1\"\n}",
"outputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"foo\": {\n \"type\": \"string\",\n \"minLength\": 5\n }\n }\n}" "outputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"foo\": {\n \"type\": \"string\",\n \"minLength\": 5\n }\n }\n}"
},
{
"_id": {"$oid": "657c5a7718f39c409b152a70"},
"filename": "example/externalURL/1.0/policy.rego",
"group": "example",
"locked": false,
"name": "externalURL",
"rego": "package example.externalURL\n\n_ := http.send({\"method\": \"get\", \"url\": \"https://vault.vereign.com/tsa/policy/liveness\"})",
"repository": "policies",
"version": "1.0"
},
{
"_id": {"$oid": "657c5c7c18f39c409b152a71"},
"filename": "example/externalURL/1.1/policy.rego",
"group": "example",
"lastUpdate": null,
"locked": false,
"name": "externalURL",
"rego": "package example.externalURL\n\n_ := http.send({\n \"method\": \"post\",\n \"url\": \"https://vault.vereign.com/tsa/policy/policy/policies/example/resolve/1.0/evaluation\",\n \"body\": {\"did\": \"did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6\"}\n})",
"repository": "policies",
"version": "1.1",
"data": null,
"dataConfig": null,
"nextDataRefreshTime": null,
"exportConfig": null,
"outputSchema": null
} }
] ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment