SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

Incorrect location for SCIM resource creation with realm enabled

Open rdv-mpq opened this issue 1 year ago • 1 comments

Hello,

When having Realms enabled for the SCIM server the returned location (both in the header and the response body) does not include the Realm id/name. As expected calling that endpoint results in a 404 as accessing resources without the Realm specified should not be possible. I'd expect the location to include the Realm that it was created in.

As an example, the creation of a user on the 01ab2cc4-16f2-4e00-8296-8cd829b4e430 Realm (POST https://localhost:7225/01ab2cc4-16f2-4e00-8296-8cd829b4e430/Users/) results in the following response:

{
	"id": "b6f44d27-04e6-46ab-adc4-8d1adb2817f2",
	"userName": "user_name",
	"name": {
		"formatted": "[first_name] [family_name]",
		"givenName": "[first_name]",
		"middleName": "[middle_name]",
		"familyName": "[family_name]"
	},
	"groups": [],
	"addresses": [],
	"emails": [],
	"phoneNumbers": [],
	"entitlements": [],
	"ims": [],
	"roles": [],
	"photos": [],
	"x509Certificates": [],
	"meta": {
		"resourceType": "User",
		"created": "2024-12-04T13:13:47.8733934Z",
		"lastModified": "2024-12-04T13:13:47.8733937Z",
		"version": 0,
		"location": "https://localhost:7225/Users/b6f44d27-04e6-46ab-adc4-8d1adb2817f2"
	},
	"externalId": "debug_user_id",
	"schemas": [
		"urn:ietf:params:scim:schemas:core:2.0:User"
	]
}

I'd expect the location to be https://localhost:7225/01ab2cc4-16f2-4e00-8296-8cd829b4e430/Users/b6f44d27-04e6-46ab-adc4-8d1adb2817f2.

rdv-mpq avatar Dec 04 '24 15:12 rdv-mpq

The issue has been fixed in the Release503 branch, and the location property should now be set correctly.

https://github.com/simpleidserver/SimpleIdServer/commit/4ccd11bb2c88e119085155d4eddd7083a2df5aa2

simpleidserver avatar Dec 04 '24 21:12 simpleidserver