Hi Andrew,
On 26/12/2017 16:35, Andrew Meyer wrote:
Jens,
I'm not familiar w/ Python. How do I pass the url, user and realm to
it? Do I do something like this - './freeipaclient.py url=myurl
user=username' ?
If you're not familiar with python my code is probably not useful for
you. It's main purpose is to be a library to be integrated into other
python tools/scripts,
not to be used as a command line tool.
To perform quick commands against ipa from the command line I just use
the ipa client
https://www.freeipa.org/page/Client
If you want to script things, then more information on the api is indeed
actually pretty hard to come by.
see
https://www.redhat.com/archives/freeipa-users/2015-April/msg00582.html
which eventually pointed me to
https://vda.li/en/posts/2015/05/28/talking-to-freeipa-api-with-sessions/
The thing here that I needed to figure out to get kerberos
authentication working in python (and probably a lot of other scripting
languages) is that
you can just set KRB5_KTNAME=/path/to/keytabfile and use GSSAPI in your
script. And to get the actuall REST calls you can just run ipa -vv
<command>
Regards,
Jens Timmerman
Thank you!
Hi Andrew,
On 20/12/2017 22:42, Andrew Meyer via FreeIPA-users wrote:
> Does anyone have any examples or could share what they have written?
>
> I am trying to write a script and not sure what components I need.
I've been working on a python client for a bit. It will probably be made
public when I'm done.
But at the moment I'm just adding methods as I need them.
You can find what I'm allowed to share at the moment at
https://gist.github.com/JensTimmerman/c123d5f6291e4cd542473241ce7bf4c9
feedback greatly appreciated.
Regards,
Jens Timmerman