Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Alexander Bokovoy
On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. $ ipa hbactest --help Usage: ipa [global-options] hbactest [options] Options: -h, --help show this help message and exit --user=STR User name --srchost=STR Source host

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Alexander Bokovoy
On 26.07.2011 13:36, Alexander Bokovoy wrote: On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. Rebased against current master (9a4ce988df219565ab84602b1eea93e14700862b) -- / Alexander Bokovoy From 895afdab5a945dfdf68746299c3f7f15d2b718a2

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Jenny Galipeau
Looks great, thank Alexander! - Original Message - On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. $ ipa hbactest --help Usage: ipa [global-options] hbactest [options] Options: -h, --help show this help message and exit

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Jakub Hrozek
On 07/26/2011 12:41 PM, Alexander Bokovoy wrote: On 26.07.2011 13:36, Alexander Bokovoy wrote: On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. Rebased against current master (9a4ce988df219565ab84602b1eea93e14700862b) My only

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Alexander Bokovoy
On 26.07.2011 15:26, Jakub Hrozek wrote: On 07/26/2011 12:41 PM, Alexander Bokovoy wrote: On 26.07.2011 13:36, Alexander Bokovoy wrote: On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. Rebased against current master

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Rob Crittenden
Alexander Bokovoy wrote: On 26.07.2011 15:26, Jakub Hrozek wrote: On 07/26/2011 12:41 PM, Alexander Bokovoy wrote: On 26.07.2011 13:36, Alexander Bokovoy wrote: On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. Rebased against current

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-26 Thread Dmitri Pal
On 07/26/2011 06:36 AM, Alexander Bokovoy wrote: On 26.07.2011 06:23, Alexander Bokovoy wrote: I'll send updated patch proposal today. Here is new patch. $ ipa hbactest --help Usage: ipa [global-options] hbactest [options] Options: -h, --help show this help message and exit

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Alexander Bokovoy
On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought --rules limited the rules that were considered. Maybe I'm misunderstanding it. --validate + --rules gives limitation, --rules alone adds more rules to the existing test set which is all enabled rules in IPA.

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 07:59 AM, Alexander Bokovoy wrote: On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought --rules limited the rules that were considered. Maybe I'm misunderstanding it. --validate + --rules gives limitation, --rules alone adds more rules to the

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 09:46 AM, Dmitri Pal wrote: On 07/25/2011 07:59 AM, Alexander Bokovoy wrote: On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought --rules limited the rules that were considered. Maybe I'm misunderstanding it. --validate + --rules gives

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Jenny Galipeau
- Original Message - On 07/25/2011 07:59 AM, Alexander Bokovoy wrote: On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought --rules limited the rules that were considered. Maybe I'm misunderstanding it. --validate + --rules gives limitation,

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 09:56 AM, Dmitri Pal wrote: Suppose we have a switch --show-invalid that takes all IPA rules and runs a simulation request against them, reporting the ones that are invalid only. OK It seems to be the right behavior as described. Other parameters should be ignored and it should

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Rob Crittenden
Dmitri Pal wrote: On 07/25/2011 07:59 AM, Alexander Bokovoy wrote: On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought --rules limited the rules that were considered. Maybe I'm misunderstanding it. --validate + --rules gives limitation, --rules alone adds

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 10:12 AM, Rob Crittenden wrote: My only problem with --all is it means we'd have an option with different meaning in different contexts. Would this cause confusion? Yes this is exactly where I am coming from too. -- Thank you, Dmitri Pal Sr. Engineering Manager IPA project, Red

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 10:06 AM, Jenny Galipeau wrote: On 07/25/2011 07:59 AM, Alexander Bokovoy wrote: On 22.07.2011 23:10, Alexander Bokovoy wrote: So this is a little confusing. I thought

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Rob Crittenden
Dmitri Pal wrote: How about: --all means all rules --enabled means all enabled rules; it can be used with the specific values like this --enabled=A,B,C then it will include only those enabled rules --disabled means all disabled rules; it can be used with the specific values like this

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Alexander Bokovoy
On 25.07.2011 17:06, Jenny Galipeau wrote: I like the functionality but --all does not sound right, may be it should be --enabled or something else. how about : --disabled --all (both enabled and disabled) Checking against all enabled and disabled makes very little sense. Rules

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Jenny Galipeau
- Original Message - On 25.07.2011 17:06, Jenny Galipeau wrote: I like the functionality but --all does not sound right, may be it should be --enabled or something else. how about : --disabled --all (both enabled and disabled) Checking against all enabled and

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Alexander Bokovoy
On 25.07.2011 19:57, Jenny Galipeau wrote: 1. No option specified. Default case, run simulation against all enabled IPA rules. 2. --rules specified. Run simulation against only those rules in --rules. 3. --rules and --enabled specified. Run simulation against all enabled IPA rules _and_

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Dmitri Pal
On 07/25/2011 01:01 PM, Alexander Bokovoy wrote: On 25.07.2011 19:57, Jenny Galipeau wrote: 1. No option specified. Default case, run simulation against all enabled IPA rules. 2. --rules specified. Run simulation against only those rules in --rules. 3. --rules and --enabled specified. Run

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-25 Thread Alexander Bokovoy
On 26.07.2011 00:13, Dmitri Pal wrote: By default, if you don't supply --rules, --enabled, or --disabled, you are targeting all enabled IPA rules (case 1 above). This is default because this is what people would probably like to test: whether user is able to access the service. So, default

[Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-22 Thread Alexander Bokovoy
Hi, attached please find a first cut of an HBAC tester command to CLI, FreeIPA ticket https://fedorahosted.org/freeipa/ticket/386 The idea behind this plugin is to re-use pyhbac module provided by SSSD project which is Python bindings for SSSD's libipa_hbac code used for actual HBAC rule

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-22 Thread Alexander Bokovoy
Now real patch: adds command, updates API.txt and VERSION files, along with freeipa.spec. On 22.07.2011 12:32, Alexander Bokovoy wrote: Hi, attached please find a first cut of an HBAC tester command to CLI, FreeIPA ticket https://fedorahosted.org/freeipa/ticket/386 The idea behind this

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-22 Thread Rob Crittenden
Alexander Bokovoy wrote: Now real patch: adds command, updates API.txt and VERSION files, along with freeipa.spec. On 22.07.2011 12:32, Alexander Bokovoy wrote: Hi, attached please find a first cut of an HBAC tester command to CLI, FreeIPA ticket https://fedorahosted.org/freeipa/ticket/386

Re: [Freeipa-devel] [WIP] Add command to test HBAC rules

2011-07-22 Thread Alexander Bokovoy
On 22.07.2011 22:47, Rob Crittenden wrote: Alexander Bokovoy wrote: Now real patch: adds command, updates API.txt and VERSION files, along with freeipa.spec. On 22.07.2011 12:32, Alexander Bokovoy wrote: Hi, attached please find a first cut of an HBAC tester command to CLI, FreeIPA