Skip to content

Commit

Permalink
Adding endpoint in POCO for polli tests (#2571)
Browse files Browse the repository at this point in the history
- Adding the api config in poco for Polli tests
  • Loading branch information
krazziekay authored Nov 27, 2023
1 parent a96455a commit 54c8707
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
32 changes: 31 additions & 1 deletion etc/poco/bundle/extras-prod-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,36 @@
"pollinator-check/b33f33a7-c308-468e-a2a2-06c1f2443bfb"
],
"allowed": false
},
{
"name": "Allow Pollinator Pollinator test to call API configuration POST endpoint",
"path": "/api/configuration",
"method": "POST",
"mechanism": "asap",
"principals": [
"pollinator-check/98a88b09-1541-4c0d-aded-4f1cc467d1fd"
],
"allowed": true
},
{
"name": "Not allow Pollinator Pollinator test to call API configuration POST endpoint for any other principals",
"path": "/api/configuration",
"method": "POST",
"mechanism": "asap",
"principals": [
"pollinator-check/random-one"
],
"allowed": false
},
{
"name": "Not allow Pollinator Pollinator test to call any API configuration endpoint except POST",
"path": "/api/configuration",
"method": "GET",
"mechanism": "asap",
"principals": [
"pollinator-check/random-one"
],
"allowed": false
}
]
]
}
20 changes: 18 additions & 2 deletions etc/poco/bundle/extras-prod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"allow": [
{
"description": "Allow prod pollinator checks to call endpoints for testing",
"description": "Allow prod pollinator checks to call delete installation endpoints for testing",
"paths": [
"/api/deleteInstallation/**"
],
Expand All @@ -18,6 +18,22 @@
]
}
}
}
},
{
"description": "Allow prod pollinator checks to call post configuration endpoints for testing",
"paths": [
"/api/configuration"
],
"methods": [
"POST"
],
"principals": {
"asap": {
"issuers": [
"pollinator-check/98a88b09-1541-4c0d-aded-4f1cc467d1fd"
]
}
}
}
]
}

0 comments on commit 54c8707

Please sign in to comment.