Re: [Trac] Re: Do users grant permissions to groups?! Is the error message wrong?

2019-09-18 Thread RjOllos


On Friday, August 30, 2019 at 6:56:27 AM UTC-7, Klaus Thorn wrote:
>
>
>
> On 29.08.2019 02:06, RjOllos wrote: 
> > If you have PERMISSION_GRANT (1), but not TRAC_ADMIN, then you must be 
> > granted all of the permissions of the group in order to grant those 
> > permissions to a user. 
>
> Thanks for explaining! I suggest to clarify to something like: 
>
> ... "group has %(perm)s permission but you do not and you cannot " 
> "grant permissions you don't possess (except with TRAC_ADMIN)." 
>
> best regards, 
> klaus 
>

I'll give some thought to improving the warning message:
https://trac.edgewall.org/ticket/13209

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/07f27a4d-dd71-4427-9de9-eb8537de1265%40googlegroups.com.


Re: [Trac] Re: Do users grant permissions to groups?! Is the error message wrong?

2019-09-18 Thread RjOllos


On Thursday, August 29, 2019 at 7:27:46 AM UTC-7, Kris Deugau wrote:
>
> RjOllos wrote: 
> > 
> > 
> > On Wednesday, August 28, 2019 at 5:01:36 AM UTC-7, Klaus Thorn wrote: 
> > 
> > 1. I log into Admin-Webfrontend of trac 1.2.3 
> > 
> > 2. Add user to group (under certain permission-conditions that i do 
> not 
> > yet understand) 
> > 
> > 3. The (better formatted than below) error message appears: 
> > 
> > "The subject %(subject)s was not added to the group %(group)s 
> > because the " 
> > "group has %(perm)s permission and users cannot grant permissions 
> > they " 
> > "don't possess." 
> > 
> > In my understanding of English and trac, adding a user to a group 
> gives 
> > permissions of the group TO the user. That's my reason to add them, 
> > anyway. But the error message suggests that the user gives the 
> > permission (to whom?!). 
> > 
> > 
> > Also confusing: 
> > 
> >Via command line, trac DOES add this user to this group, 
> >and without error. 
> > 
> >trac-admin ... permission add user @group 
> > 
> > 
> > You won't see the error if you possess TRAC_ADMIN permission. 
> > 
> > If you have PERMISSION_GRANT (1), but not TRAC_ADMIN, then you must be 
> > granted all of the permissions of the group in order to grant those 
> > permissions to a user. Otherwise, you could elevate your own privileges, 
> > or the privileges of others. In the extreme case, you could grant 
> > yourself TRAC_ADMIN. 
>
> To put it another way, the error is addressing the permissions of the 
> user trying to make the change, not the user the change is being applied 
> to. 
>
> When using trac-admin from the command line, you have TRAC_ADMIN more or 
> less by definition. 
>
> > Example: Suppose group1 has TICKET_ADMIN and you are not a member of 
> > group1 and do not possess TICKET_ADMIN. Then you cannot add a user to 
> > group1. If this was allowed, you could elevate your own permissions by 
> > adding yourself to group1 and granting yourself TICKET_ADMIN. 
> > 
> > (1) https://trac.edgewall.org/wiki/TracPermissions#Permissions 
>
> I would argue that the error message should be reworded to something 
> along the lines of: 
>
> "The subject %(subject)s was not added to the group %(group)s 
> because the group has permissions that you do not.  You cannot grant 
> permissions you do not possess." 
>
> Listing the permissions you don't have is an information disclosure that 
> may be a security violation in some environments. 
>

I'd say that you really shouldn't give PERMISSION_ADMIN to any user you 
don't trust enough to know the permissions of the environment. Suppose we 
don't list the permission, and just tell the user that they cannot grant 
the permission, the user could infer permissions by testing which they are 
able to grant.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/0886bf0a-bdb7-4eda-a7a9-9b94324b6974%40googlegroups.com.


Re: [Trac] Re: Do users grant permissions to groups?! Is the error message wrong?

2019-08-30 Thread Klaus Thorn




On 29.08.2019 02:06, RjOllos wrote:
If you have PERMISSION_GRANT (1), but not TRAC_ADMIN, then you must be 
granted all of the permissions of the group in order to grant those 
permissions to a user.


Thanks for explaining! I suggest to clarify to something like:

... "group has %(perm)s permission but you do not and you cannot "
"grant permissions you don't possess (except with TRAC_ADMIN)."

best regards,
klaus

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/1947f14b-ed51-8e78-8337-b9b277297851%40programmfabrik.de.


Re: [Trac] Re: Do users grant permissions to groups?! Is the error message wrong?

2019-08-29 Thread Kris Deugau

RjOllos wrote:



On Wednesday, August 28, 2019 at 5:01:36 AM UTC-7, Klaus Thorn wrote:

1. I log into Admin-Webfrontend of trac 1.2.3

2. Add user to group (under certain permission-conditions that i do not
yet understand)

3. The (better formatted than below) error message appears:

"The subject %(subject)s was not added to the group %(group)s
because the "
"group has %(perm)s permission and users cannot grant permissions
they "
"don't possess."

In my understanding of English and trac, adding a user to a group gives
permissions of the group TO the user. That's my reason to add them,
anyway. But the error message suggests that the user gives the
permission (to whom?!).


Also confusing:

   Via command line, trac DOES add this user to this group,
   and without error.

   trac-admin ... permission add user @group


You won't see the error if you possess TRAC_ADMIN permission.

If you have PERMISSION_GRANT (1), but not TRAC_ADMIN, then you must be 
granted all of the permissions of the group in order to grant those 
permissions to a user. Otherwise, you could elevate your own privileges, 
or the privileges of others. In the extreme case, you could grant 
yourself TRAC_ADMIN.


To put it another way, the error is addressing the permissions of the 
user trying to make the change, not the user the change is being applied to.


When using trac-admin from the command line, you have TRAC_ADMIN more or 
less by definition.


Example: Suppose group1 has TICKET_ADMIN and you are not a member of 
group1 and do not possess TICKET_ADMIN. Then you cannot add a user to 
group1. If this was allowed, you could elevate your own permissions by 
adding yourself to group1 and granting yourself TICKET_ADMIN.


(1) https://trac.edgewall.org/wiki/TracPermissions#Permissions


I would argue that the error message should be reworded to something 
along the lines of:


"The subject %(subject)s was not added to the group %(group)s
because the group has permissions that you do not.  You cannot grant 
permissions you do not possess."


Listing the permissions you don't have is an information disclosure that 
may be a security violation in some environments.


-kgd

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/ccab50ec-8c2c-2198-819a-d8172f259284%40vianet.ca.


[Trac] Re: Do users grant permissions to groups?! Is the error message wrong?

2019-08-28 Thread RjOllos


On Wednesday, August 28, 2019 at 5:01:36 AM UTC-7, Klaus Thorn wrote:
>
> 1. I log into Admin-Webfrontend of trac 1.2.3 
>
> 2. Add user to group (under certain permission-conditions that i do not 
> yet understand) 
>
> 3. The (better formatted than below) error message appears: 
>
> "The subject %(subject)s was not added to the group %(group)s because the 
> " 
> "group has %(perm)s permission and users cannot grant permissions they " 
> "don't possess." 
>
> In my understanding of English and trac, adding a user to a group gives 
> permissions of the group TO the user. That's my reason to add them, 
> anyway. But the error message suggests that the user gives the 
> permission (to whom?!). 
>
>
> Also confusing: 
>
>   Via command line, trac DOES add this user to this group, 
>   and without error. 
>
>   trac-admin ... permission add user @group 
>

You won't see the error if you possess TRAC_ADMIN permission.

If you have PERMISSION_GRANT (1), but not TRAC_ADMIN, then you must be 
granted all of the permissions of the group in order to grant those 
permissions to a user. Otherwise, you could elevate your own privileges, or 
the privileges of others. In the extreme case, you could grant yourself 
TRAC_ADMIN.

Example: Suppose group1 has TICKET_ADMIN and you are not a member of group1 
and do not possess TICKET_ADMIN. Then you cannot add a user to group1. If 
this was allowed, you could elevate your own permissions by adding yourself 
to group1 and granting yourself TICKET_ADMIN.

(1) https://trac.edgewall.org/wiki/TracPermissions#Permissions 

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/56fb564a-e4e4-43d4-94af-5c8b4f92bca5%40googlegroups.com.