Re: [Freeipa-devel] [ui-devel-tool] Updating and creating Web UI .json files

2012-01-13 Thread Adam Young

On 01/13/2012 11:09 AM, Petr Vobornik wrote:
I have created a helper tool (script) for updating 
install/ui/test/data/*.json files which are used for offline 
presentation of FreeIPA Web UI. So I'm sharing it as it might be 
useful for others.


Main purpose:
* updating ipa_init*.json files (should replace old not-working bash 
script)

* creating new *.json files when implementing new UI functionality
* updating existing files when modifying UI.

Pros:
* command definition is very easy - just copy it from Chromium or 
other developer tool a paste it into the code (with little text around).


How it works:
* user can define commands - concrete command with name, arguments and 
options


then it can
* call the command (using curl) and get JSON response from IPA server
* modify the response
* save response to file
* or print response to console

Current modification of response:
* replaces dns, domains, hostname from IPA server's to dev.example.com
* removes principal and version (no more various GIT versions)
* removes trailing whitespaces

Additional functionality:
* possibility to define command groups
* can execute multiple commands or groups
* list defined commands and groups

Common usage:
ipa-json.py -v -d -s --methods method_name method_2_name

or type 'ipa-json.py -h' for more options

note: command and method mean basically the same, the naming should be 
united...


Possible future enhancements:
* add kerberos authentication
* split definition of methods, code and configuration to multiple files



___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Petr,

Kerberos should be pretty straight forward.  For command line  curl it is

--negotiate -u  --delegation always

so you should be able to add those options right before 
c.setopt(pycurl.URL, url)





||
||






___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [ui-devel-tool] Updating and creating Web UI .json files

2012-01-13 Thread Simo Sorce
On Fri, 2012-01-13 at 12:38 -0500, Adam Young wrote:
 On 01/13/2012 11:09 AM, Petr Vobornik wrote: 
  I have created a helper tool (script) for updating
  install/ui/test/data/*.json files which are used for offline
  presentation of FreeIPA Web UI. So I'm sharing it as it might be
  useful for others. 
  
  Main purpose: 
  * updating ipa_init*.json files (should replace old not-working bash
  script) 
  * creating new *.json files when implementing new UI functionality 
  * updating existing files when modifying UI. 
  
  Pros: 
  * command definition is very easy - just copy it from Chromium or
  other developer tool a paste it into the code (with little text
  around). 
  
  How it works: 
  * user can define commands - concrete command with name, arguments
  and options 
  
  then it can 
  * call the command (using curl) and get JSON response from IPA
  server 
  * modify the response 
  * save response to file 
  * or print response to console 
  
  Current modification of response: 
  * replaces dns, domains, hostname from IPA server's to
  dev.example.com 
  * removes principal and version (no more various GIT versions) 
  * removes trailing whitespaces 
  
  Additional functionality: 
  * possibility to define command groups 
  * can execute multiple commands or groups 
  * list defined commands and groups 
  
  Common usage: 
  ipa-json.py -v -d -s --methods method_name method_2_name 
  
  or type 'ipa-json.py -h' for more options 
  
  note: command and method mean basically the same, the naming should
  be united... 
  
  Possible future enhancements: 
  * add kerberos authentication 
  * split definition of methods, code and configuration to multiple
  files 
  
  
  
  ___
  Freeipa-devel mailing list
  Freeipa-devel@redhat.com
  https://www.redhat.com/mailman/listinfo/freeipa-devel
 
 Petr,
 
 Kerberos should be pretty straight forward.  For command line  curl it
 is
 
 --negotiate -u  --delegation always
 
 so you should be able to add those options right before
 c.setopt(pycurl.URL, url)
 
 
Actually this is changing.

With 2.2 we are introducing s4u2proxy, so you should negotiate but you
should *not* delegate anymore.

Also with the session support you will need to start using secure
cookies and make sure the tool behaves correctly with multiple redirects
when you want to use json.

The xml-rpc interface will not use session for the time being.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel