typo here but does this mean that each user's databag should now have a new attribute/field called 'external_id'?   How about an approach in which we provide a cookbook attribute node["gerrit"]["external_users"] = ['alff', 'yorik']  and then this line could be:

if node["gerrit"]["external_users"].include?(user['id'])