Hi, still implementing scim api in an app.
In the protocol, on resource creation (user or group), the Id provider will give an ExternalId property, that allows it, on the next list to be able to easily map resources (users or groups) between updates.
On the user side of the story, this will be easy, I’ll use oc_preferences
to store/show this external_id.
On the groups, there is currently no way, not that I’m aware, to store metadata on this object.
I though about various workarounds to avoid creating a table for my app:
- preferences, but it has to belong to a user
- comments, it could be a comment about the group, but I don’t think this should be used for that
- systemtag, this is not a tag, this is a key=value thing
- appconfig, maybe it could be an app config
nextcloud=# select * from oc_appconfig;
appid | configkey | configvalue |
---|---|---|
scim | admin_externalid | 1234 |
scim | group1_externalid | 5678 |
Maybe this is the easiest, but this is not really an app config, but more metadata about groups.
Then, maybe, the best option would be to have an app that allows any dev to add metadata about any objects in the DB? Something like:
nextcloud=# select * from oc_metadata;
object_type | object_id | key | value |
---|---|---|---|
group | admin | externalid | 1234 |
group | group1 | externalid | 5678 |
file | 1234 | foo | bar |
user | admin | test | value |
And this app woul dbe a dependence to my app? Does it exist to have dependencies between apps?
And finally, I could also just create and maintain my own table… But I have the feeling that this is not the best option
Curious about your opinions!
Thanks and have a nice day!