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

Add primary subAttribute to addresses multi-value attribute of User schema #23

Merged

Conversation

brianpeiris
Copy link
Contributor

@brianpeiris brianpeiris commented Apr 18, 2024

Similar to #17 and #18, this PR adds the missing "primary" sub-attribute to the "addresses" attribute on the User schema.
The "primary" attribute is one of the default sub-attributes for multi-valued attributes as defined in RFC 7643, section 2.4, with an example of this in demonstrated in section 8.2.

Okta includes this "primary" sub-attribute on addresses by default.

@sleelin sleelin self-requested a review April 19, 2024 03:33
@sleelin sleelin self-assigned this Apr 19, 2024
@sleelin sleelin added this to the 1.1.0 milestone Apr 19, 2024
Copy link
Collaborator

@sleelin sleelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brianpeiris, just in the nick of time, as I was just preparing to release v1.1.0!

This is another example of just how inconsistent the SCIM specification RFC is! When setting out the default attributes in RFC7643§2.4, there's no real explanation of what is meant by "if not otherwise defined". It's clear that these should be used for all other complex multi-value User attributes set out in RFC7643§4.1.2, but the addresses attribute is otherwise defined in this section? This leaves open my initial interpretation that the default attributes are intentionally missing from the addresses attribute (as explained in PR #9), supported by the User resource schema representation in section 8.7.1, which does not include any of the default multi-value attributes.

As you pointed out though, this is contradicted by the addresses value of the Full User JSON representation in section 8.2, and of the Enterprise User Extension JSON representation in section 8.3, which do include the primary attribute in the first listed address.

I still hold my original view from PR #9 that proper conformance to the specification means the primary attribute should not be included as a sub-attribute of addresses. As Okta doesn't agree though, it may be prudent at this time to include it out of the box in the next release, as being "in the spirit" of the specification.

Thanks,
Sam

@sleelin sleelin added the feature New feature or request label Apr 19, 2024
@sleelin sleelin merged commit 6cd162c into scimmyjs:main Apr 19, 2024
@brianpeiris
Copy link
Contributor Author

Thanks for the quick merge. Glad it got in for the next release. I agree the spec is not very clear, and obviously Okta interpreted it in their own way. Seems sensible to follow the spirit of the spec, as you've mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants