how can I add a user to multiple roles?
I have several media factories (f0 to fN). The access to each of them is controlled by a corresponding role (r0 to rN). I want to be able to let user1 to access both f0 and f1. It seems like not possible in current implementation.
the gst_rtsp_auth_add_digest()
will update the token in priv->digest
and the digest does not allow multiple entries for the same key.
If I make each user corresponding to a unique role and add those roles to target media factories, it will work for gst_rtsp_auth_add_digest()
. However, this will not work for htdigest. Since the gst_rtsp_auth_parse_htdigest()
add all uses in the file with a single token, all the users in the htdigest will be assigned to a same role.
I wonder what is the concept of the role/token in this project? I think a role is a collection of group of privileges. Thus it should be able to contain several users and a single user should be able to belong to several roles.
If the role-user map is injective only, then the gst_rtsp_auth_parse_htdigest()
should lookup target user and only add/update the target user only.