When implementing the find_with proc in the scim_attributes_map of the Group class we can write something like this:
find_with: ->(scim_list_entry) {
id = scim_list_entry['value']
type = scim_list_entry['type'] || 'User' # Some online examples omit 'type' and believe 'User' will be assumed
case type.downcase
when 'user' then User.find_by(uuid: id)
when 'group' then ScimGroup.find_by(uuid: id)
else raise Scimitar::InvalidSyntaxError, "Unrecognised type #{type.inspect}"
end
}
Unfortunately this is a security risk where if a malicious actor with an account had the user id of a user from another account/tenant they could access details of that user.
Is there any way to pass additional information into that function so that we could scope the finds to the tenant?
When implementing the
find_withproc in thescim_attributes_mapof theGroupclass we can write something like this:Unfortunately this is a security risk where if a malicious actor with an account had the user id of a user from another account/tenant they could access details of that user.
Is there any way to pass additional information into that function so that we could scope the finds to the tenant?