fabbricadigitale / scimd

SCIM v2 golang implementation
MIT License
5 stars 1 forks source link

Inconsistency of meta attributes definition with the logic of projection #56

Closed leodido closed 6 years ago

leodido commented 6 years ago

RFC 7643 @ section 3.1 mandates that the meta attributes have a "returned" characteristic equal to "default".

This contrasts with the logic of attribute inclusion (and exclusion, ie. projection).

Namely,

attributes  A multi-valued list of strings indicating the names of
      resource attributes to return in the response, overriding the set
      of attributes that would be returned by default.

Ref.

attributes  When specified, the default list of attributes SHALL be
           overridden,

Ref.

Our projection logic follows the RFC logic.

So, at the end when we specify to include only some attributes we lose the meta ones. This causes panics in the code since within the storage/mongo/adapater.go::toResource() method we expect/assume the dd["meta"] cannot be nil.

cc @leogr @alelb @samechelon

leodido commented 6 years ago

Fix within the feature/server branch. Closing.