Comments (4)
I've switched to the very latest SimpleIdServer source to help diagnose this. I can see that the NullReference exception is actually coming from the first line of ComputeValueIndex: the value of SchemaAttribute
is actually null
in my case for the attribute with a full path of 'phoneNumbers'. Looking in the database, the SCIMRepresentationAttribute has a null SchemaAttributeId column value.
(Does it ever make sense for that to be null?)
from simpleidserver.
Hello,
The SchemaAttributeId is getting erased because the navigation properties are not considered in the BulkInsertAsync
instruction :(. The issue has been resolved in the master branch. Could you please try again?
Kind Regards,
SID
from simpleidserver.
Yes, that looks much happier. The SchemaAttributeId is no longer getting into the database as null, and the ComputedValueIndex (whatever that is) is also being populated now, so reads work happily.
Thank you for the rapid fix!
If SchemaAttributeId is always a required value, would it be worth tweaking the definition of it so that nulls can't get into the database?
e.g.
public void Configure(EntityTypeBuilder<SCIMRepresentationAttribute> builder)
{
...
builder.Property(a => a.SchemaAttributeId).IsRequired();
...
}
?
Btw, I'm currently attempting to add multi-tenant support for SCIM. I've seen the existing 'shadow property' example, but it requires copying quite a bit of CommandRepository/QueryRepository code. I've just about managed to make a set of code work that only:
- subclasses the ScimDbContext (to filter on tenant and add tenant during writes)
- subclasses RepresentationHelper so that I can make the attributes marked as SCIMSchemaAttributeUniqueness.SERVER and SCIMSchemaAttributeUniqueness.GLOBAL have slightly different behaviour (i.e. per-instance and global, respectively)
i.e. I've not had to make any changes to, or any copies of, any of the repositories, which is really nice.
Doing this would be a little easier if there was an extra protected constructor on ScimDbContext
to allow easy subclassing, and if RepresentationHelper.CheckUniqueness
were marked virtual
. Would you be willing to accept small PRs along those lines?
from simpleidserver.
Hello,
Certainly, the SchemaAttributeId can be designated as a required property in the Entity Framework Configuration.
I would appreciate it if you could submit a pull request with your suggested modifications to simplify the ScimShadowProperty sample project :)
from simpleidserver.
Related Issues (20)
- SCIM Issue after latest update HOT 1
- Client Credentials Grant and basic HOT 8
- IdServerWebsite - Move all the translations into the global file
- IdServer - Refactor credential issuer
- [SCIM] - PATCH group support 'value eq' HOT 3
- [SCIM] remove users by PUT HOT 2
- [SCIM] delete a group with a member HOT 4
- CPU usage problem - Configure centralized configuration
- MySQL Migrations error HOT 4
- ApiKey was forbidden on SCIM patch HOT 1
- Questions HOT 2
- Credential Issuer not bullding HOT 5
- There was a problem converting all DateTime.UtcNow to DateTime.Now HOT 4
- The sample encountered a problem HOT 6
- Email and profile picture problems HOT 8
- User can edit his picture
- Implement Verifiable Presentation
- Problems encountered during testing HOT 42
- Document - Explains how to enroll a mobile application with gotify
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleidserver.