[Freeipa-devel] [freeipa PR#535][opened] add whoami command

abbra freeipa-github-notification at redhat.com
Thu Mar 2 17:12:56 UTC 2017


   URL: https://github.com/freeipa/freeipa/pull/535
Author: abbra
 Title: #535: add whoami command
Action: opened

PR body:
"""
`ipa whoami` command allows to query details about currently
authenticated identity. The command returns following information:

  * object class name
  * function to call to get actual details about the object
  * arguments to pass to the function
  * options to pass to the function

There are five types of objects that could bind to IPA using their
credentials. `ipa whoami` call expects one of the following:

  * users
  * staged users
  * hosts
  * Kerberos services
  * ID user override from the default trust view

The latter category of objects is automatically mapped by SASL GSSAPI
mapping rule in 389-ds for users from trusted Active Directory forests.

The command is expected to be used by Web UI to define proper view for
the authenticated identity.

Below is an example of how communication looks like for an Active
Directory user which has ID override in 'Default Trust View'.

    $ ipa -vv whoami
    ipa: INFO: trying https://ipa.example.com/ipa/session/json
    ipa: INFO: Forwarding 'whoami/1' to json server 'https://ipa.example.com/ipa/session/json'
    ipa: INFO: Request: {
        "id": 0,
        "method": "whoami/1",
        "params": [
            [],
            {
                "version": "2.220"
            }
        ]
    }
    ipa: INFO: Response: {
        "error": null,
        "id": 0,
        "principal": "Administrator at AD.DOMAIN",
        "result": {
            "arguments": [
                "default trust view",
                "administrator at ad.domain"
            ],
            "details": "idoverrideuser_show/1",
            "object": "idoverrideuser",
            "options": []
        },
        "version": "<IPA VERSION>"
    }

Fixes https://pagure.io/freeipa/issue/6643
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/535/head:pr535
git checkout pr535
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pr-535.patch
Type: text/x-diff
Size: 9751 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20170302/5814a82b/attachment.bin>


More information about the Freeipa-devel mailing list