SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

Version attribute in SCIM Metadata response does not follow RFC

Open nwoolls opened this issue 1 year ago • 1 comments

Currently, the version attribute returned by the SCIM server in the meta section of a resource is a number. The RFC for SCIM 2 indicates this should be an ETag. Most implementations I've worked with (and indeed all of the RFC examples) have this attribute as a string, so our parsing logic falls down when this SCIM server returns a number.

See: https://datatracker.ietf.org/doc/html/rfc7643#section-3.1

nwoolls avatar Dec 03 '24 17:12 nwoolls

Hello,

The issue has been fixed in the Release503 branch. The version property of a representation is now returned as a string.

By default, the version is an integer that increments each time a modification is made to the representation. However, you can define your own versioning logic by implementing the following interface:

public interface IRepresentationVersionBuilder
{
    string Build(SCIMRepresentation representation);
}

public class CustomRepresentationVersionBuilder : IRepresentationVersionBuilder
{
    public string Build(SCIMRepresentation representation)
    {
        return Guid.NewGuid().ToString()
    }
}

Changes : https://github.com/simpleidserver/SimpleIdServer/commit/8a3345fc84781e657f7b6f2771276d73b8f0d04f

KR,

SID

simpleidserver avatar Dec 04 '24 13:12 simpleidserver