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 SCIM System Schema #418

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Conversation

amanda-ariyaratne
Copy link
Contributor

@amanda-ariyaratne amanda-ariyaratne commented Jan 16, 2025

Purpose

Add SCIM system schema extension and refactor related components

This pull request introduces a new System User Schema to the SCIM library which will contain the product related SCIM attributes. Additionally, minor cleanups and refactors have been made for consistency and clarity.

Related Issue

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 69.91870% with 37 lines in your changes missing coverage. Please review.

Project coverage is 29.98%. Comparing base (60f178d) to head (8ee1062).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...core/protocol/endpoints/SchemaResourceManager.java 0.00% 17 Missing ⚠️
.../core/config/SCIMSystemSchemaExtensionBuilder.java 78.57% 7 Missing and 2 partials ⚠️
...n3/core/config/SCIMUserSchemaExtensionBuilder.java 33.33% 4 Missing ⚠️
...ava/org/wso2/charon3/core/encoder/JSONDecoder.java 25.00% 3 Missing ⚠️
...rg/wso2/charon3/core/schema/AbstractValidator.java 66.66% 0 Missing and 2 partials ⚠️
.../org/wso2/charon3/core/extensions/UserManager.java 0.00% 1 Missing ⚠️
...va/org/wso2/charon3/core/schema/SCIMConstants.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #418      +/-   ##
============================================
+ Coverage     28.40%   29.98%   +1.57%     
- Complexity      919      970      +51     
============================================
  Files           133      134       +1     
  Lines         13007    13138     +131     
  Branches       2504     2518      +14     
============================================
+ Hits           3695     3939     +244     
+ Misses         8839     8703     -136     
- Partials        473      496      +23     
Flag Coverage Δ
unit 29.24% <69.91%> (+1.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amanda-ariyaratne amanda-ariyaratne force-pushed the master branch 3 times, most recently from f84a42d to 4a8203d Compare January 20, 2025 09:55
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/12886916328

address review comments
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12886916328
Status: cancelled

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/12892877900

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12892877900
Status: cancelled

@amanda-ariyaratne
Copy link
Contributor Author

The integration tests were run locally with the changes in following PRs.

  1. Add SCIM System Schema #418
  2. Move attributes to system schema carbon-identity-framework#6336
  3. Add SCIM System Schema wso2-extensions/identity-inbound-provisioning-scim2#594
  4. Fix integration tests for system and custom schema product-is#22361

We can merge PRs 1, 2 & 3 and bump their versions in PR 4 and run the integration tests again.

Screenshot 2025-01-22 at 21 36 19

…/SCIMSystemSchemaExtensionBuilder.java

Co-authored-by: sadilchamishka <[email protected]>
JSONObject rawAttributeConfig = attributeConfigArray.getJSONObject(index);
ExtensionAttributeSchemaConfig schemaAttributeConfig =
new ExtensionAttributeSchemaConfig(rawAttributeConfig);
if (schemaAttributeConfig.getURI().startsWith(extensionRootAttributeURI)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the schemaAttributeConfig.getURI() be null?

Copy link
Contributor Author

@amanda-ariyaratne amanda-ariyaratne Jan 23, 2025

Choose a reason for hiding this comment

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

No. getJSONObject always returns a JSON object. If there are parsing errors, then an exception is thrown.

ashensw
ashensw previously approved these changes Jan 23, 2025
@amanda-ariyaratne amanda-ariyaratne merged commit 22fd674 into wso2:master Jan 23, 2025
4 checks passed
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.

4 participants