Closed canea-asb closed 2 months ago
I don't know why AppVeyor build failed, the build succeeded locally. I don't think I can re-run the build either...
Hello @canea-asb ,
First, thank you for your contribution to the project. The pull request has been accepted because it fixes both bugs.
I didn't notify them because the "SimpleIdServer.Scim.Startup" project does not use the StandardSchemas object. Instead, it reads the SCIM schemas from files, parses them, and inserts the results into the data storage.
You correctly identified some issues within this class. :)
PS : OpenID Federation is supported starting from version 5.0.1. You can follow this tutorial to implement a working scenario. :)
If you have any questions, feel free to contact me.
Great!
Nice that you support Open ID Federation. My question on gitter concerned the "FastFed" specification though. ☺️ Do you have any plans on implementing it?
Oops, my bad! :)
We will start implementing fast-fed once we have completed the following tasks:
@canea-asb :
The release 5.0.2 has been published, and OPENID FastFed is now supported. 😊 To learn more about this topic, you can read this tutorial:
https://simpleidserver.com/docs/next/tutorial/fastfed
If you have any questions about how to implement it, I would be glad to help you.
I think that I have found two bugs in SimpleIdServer.Scim.Domain. Perhaps they are intentional and if so please explain why the code is like this. Just trying to help out. :)
Do this before reproducing the bugs
Replace the content of Program.cs with the following:
Run the Startup project now.
Bug 1: Cannot specify the attribute "primary" in an address.
Given that you are running the Program.cs file above... When sending the HTTP request below:
Then you get the following exception:
It can be solved by adding
c.AddBooleanAttribute("primary");
after line 81 in StandardSchemas.cs in SimpleIdServer.Scim.Domains.StandardSchemas (see the commits in this PR). Why do I think this is a bug? Because according to RFC 7643 it is possible to specify "primary" for an address (see the example here).I think it is appropriate to also update the UserSchema.json in the Schemas directory of SimpeIdServer.Scim.Startup to reflect this change.
Bug 2: Crash when sending POST to /Users
Given that you are running the Program.cs file above... When sending a POST request like this (replace Bearer token in the HTTP Authorization header):
Then you get the following exception:
In the exception message, notice on line 4 that they say "Can not add property groups to Newtonsoft.Json.Linq.JObject". That message was quite confusing at first because I thought "property groups" was a concept in JObject. But after googling and comparing my problem to other problems on Stackoverflow for example, this exception really means that there is a property called "groups" that gets added more than once to a JObject object. This led me to look in StandardSchemas in the Scim.Domain project, and there I noticed that "groups" was added twice to the static variable UserSchema.
A fix for this is to remove the second call to AddComplexAttribute("groups", ...) in StandardSchemas.cs (see the commits in this PR). I also made the subattributes in "groups" to be read-only, because they are read-only in the user schema in the "Schemas" directory of SimpeIdServer.Scim.Startup.