Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix attribute query handling for extension schemas #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atheriel
Copy link

The existing serialization code supports including and excluding attributes as required by RFC 7644 but does not handle "fully qualified" attributes that contain the URN prefix, i.e. urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber because it expects that . is used as a separator instead of :.

This PR adds detection of : and updates the existing unit tests to capture this scenario.

Under RFC 7644, clients are expected to request attributes from extension schemas in this form. It clarifies that the "attribute" query parameter should be composed of

... a comma-separated list of resource attribute names in standard attribute notation

Where the distinct "standard attribute notation" for extension attributes is further detailed as follows:

Clients MAY omit core schema attribute URN prefixes but SHOULD fully qualify extended attributes with the associated schema extension URN to avoid naming conflicts. For example, the attribute 'age' defined in "urn:ietf:params:scim:schemas:exampleCo:2.0:hr" is uniquely identified as "urn:ietf:params:scim:schemas:exampleCo:2.0:hr:age".

The existing serialization code supports including and excluding
attributes as required by RFC 7644 but does not handle "fully qualified"
attributes that contain the URN prefix, i.e.
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber"
because it expects that `.` is used as a separator instead of `:`.

This commit adds detection of `:` and updates the existing unit tests to
capture this scenario.

Under RFC 7644, clients are expected to request attributes from
extension schemas in this form [0]. It clarifies that the "attribute"
query parameter should be composed of

> ... a comma-separated list of resource attribute names in standard
> attribute notation

Where the distinct "standard attribute notation" for extension
attributes is further detailed as follows [1]:

> Clients MAY omit core schema attribute URN prefixes but SHOULD fully
> qualify extended attributes with the associated schema extension URN
> to avoid naming conflicts. For example, the attribute 'age' defined in
> "urn:ietf:params:scim:schemas:exampleCo:2.0:hr" is uniquely identified
> as "urn:ietf:params:scim:schemas:exampleCo:2.0:hr:age".

[0]: https://datatracker.ietf.org/doc/html/rfc7644#section-3.9
[1]: https://datatracker.ietf.org/doc/html/rfc7644#section-3.10

Signed-off-by: Aaron Jacobs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant