Closed michielbdejong closed 1 year ago
2023-05-15 08:35:28,642 DEBUG Would make the following call to HTTP endpoint:
url : https://tst-miskatonic.data.surfsara.nl/index.php/apps/federatedgroups/scim/Groups
method: POST
payload:
json:{"displayName": "TestGroup (uniharderwijk_surfdrive_test) (SRAM CO)", "externalId": "[3f938b6b-cbe0-4856-beb3-91dffa773c15@sram.surf.nl](mailto:3f938b6b-cbe0-4856-beb3-91dffa773c15@sram.surf.nl)", "members": [{"display": "", "value": "[zoete001@surf.nl](mailto:zoete001@surf.nl)"}, {"display": "", "value": "[wezep001@surf.nl](mailto:wezep001@surf.nl)"}, {"display": "", "value": "[zoete001@surf.nl](mailto:zoete001@surf.nl)"}, {"display": "", "value": "[wezep001@surf.nl](mailto:wezep001@surf.nl)"}], "urn:mace:surf.nl:sram:scim:extension:Group": {"description": "Provisioned by service Research Drive test - ", "labels": [], "urn": "uniharderwijk:surfdrive_test:srd_test-testgroup"}, "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group", "urn:mace:surf.nl:sram:scim:extension:Group"], "id": "TestGroup (uniharderwijk_surfdrive_test) (SRAM CO)", "meta": {"created": "2023-05-09T09:28:12.589456", "lastModified": "2023-05-09T09:28:12.602001", "location": "/Groups/848a0f5d-b492-4580-80f1-1950cf7be410", "resourceType": "Group"}}
We have tested the createGroup endpoint on your deployment on : https://tst-miskatonic.data.surfsara.nl/index.php/apps/federatedgroups/scim/Groups and also on our instances with your request payload and its results in 201, CREATED
can you give us more details on how you are testing it so we can recreate the issue?
curl --location 'https://tst-miskatonic.data.surfsara.nl/index.php/apps/federatedgroups/scim/Groups' \
--header 'Content-Type: application/json' \
--header 'Cookie: app_cookie=rd-manager-c-01|ZGNYZ|ZGNYM; dc_cookie=http://10.234.6.57:80; oc_sessionPassphrase=qlf7WJmG1nEY2n24UZIuGVfHUTKtdrRG1XhcssC25uBnl%2BOuzgN09NSECBq2BkWDKktlqmj9Y5rVHi0YVBuMoB0b9ME%2B0%2FI2YgcQoZGChipSKVvZHQSMQrcpixzL4Ji%2F; oco1leooohkc=h55q3mu6nqm65puo6otfnip3cf' \
--data-raw '{
"displayName": "TestGroup (uniharderwijk_surfdrive_test) (SRAM CO)",
"externalId": "3f938b6b-cbe0-4856-beb3-91dffa773c15@sram.surf.nl",
"members": [
{
"display": "",
"value": "zoete001@surf.nl"
},
{
"display": "",
"value": "wezep001@surf.nl"
},
{
"display": "",
"value": "zoete001@surf.nl"
},
{
"display": "",
"value": "wezep001@surf.nl"
}
],
"urn:mace:surf.nl:sram:scim:extension:Group": {
"description": "Provisioned by service Research Drive test - ",
"labels": [],
"urn": "uniharderwijk:surfdrive_test:srd_test-testgroup"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:mace:surf.nl:sram:scim:extension:Group"
],
"id": "TestGroup (uniharderwijk_surfdrive_test) (SRAM CO)",
"meta": {
"created": "2023-05-09T09:28:12.589456",
"lastModified": "2023-05-09T09:28:12.602001",
"location": "/Groups/848a0f5d-b492-4580-80f1-1950cf7be410",
"resourceType": "Group"
}
}'
That works. But as data-raw and not json:
{"reqId":"ZGNYYn-gfcTgj2cOD@e9AAAAAAM","level":1,"time":"16\/May\/2023:12:18:11","remoteAddr":"10.234.0.3","user":"--","app":"admin_audit","method":"POST","url":"\/index.php\/apps\/federatedgroups\/scim\/Groups","message":"Group TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) created by IP 10.234.0.3","action":"group_created","group":"TestGroup (uniharderwijk_surfdrive_test) (SRAM CO)","CLI":false,"userAgent":"PostmanRuntime\/7.32.2","auditGroups":[],"auditUsers":[],"actor":"IP 10.234.0.3"}
Why did I not tried that myself 🤦♂️ Changed from JSON object to raw object, now it works.
2023-05-16 10:33:53,556 DEBUG Would make the following call to HTTP endpoint:
url : https://tst-miskatonic.data.surfsara.nl/index.php/apps/federatedgroups/scim/Groups
method: POST
payload:{"displayName": "TestGroup (uniharderwijk_demo_co_srd) (SRAM CO)", "externalId": "422b006f-e1e8-4af9-957a-4fe0bc785dcd@sram.surf.nl", "members": [{"display": "", "value": "wezep001@surf.nl"}], "urn:mace:surf.nl:sram:scim:extension:Group": {"description": "Provisioned by service Research Drive test - ", "labels": [], "urn": "uniharderwijk:demo_co_srd:srd_test-testgroup"}, "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group", "urn:mace:surf.nl:sram:scim:extension:Group"], "id": "TestGroup (uniharderwijk_demo_co_srd) (SRAM CO)", "meta": {"created": "2023-05-09T09:28:12.500065", "lastModified": "2023-05-09T09:28:12.507060", "location": "/Groups/5452203f-468b-49fb-af2d-0d26ed288d8e", "resourceType": "Group"}}
json:
{"reqId":"ZGNbfuyhEgq1FDj2cFi2jgAAAAE","level":1,"time":"16\/May\/2023:12:31:26","remoteAddr":"10.234.2.58","user":"--","app":"admin_audit","method":"POST","url":"\/index.php\/apps\/federatedgroups\/scim\/Groups","message":"Group TestGroup (uniharderwijk_demo_co_srd) (SRAM CO) created by IP 10.234.2.58","action":"group_created","group":"TestGroup (uniharderwijk_demo_co_srd) (SRAM CO)","CLI":false,"userAgent":"python-requests\/2.28.2","auditGroups":[],"auditUsers":[],"actor":"IP 10.234.2.58"}
@T0mWz can you send a curl command that doesn't work? The curl we tested with is setting content type in the header. On our end we are ignoring content type and reading the request body as raw string and the parse it into a JSON.
Which tool are you using to test? Are you OK now? We need a curl command so we can reproduce the error on our end as well.
Before this sent it as JSON and not directly data. Make use of the Python Requests library, where I just give it as a JSON or now as data payload
So everything is working now? right?
if so we can close the issue?!!
POST /index.php/apps/federatedgroups/scim/Groups
body:Error logged: