GitHub user dfjdejulio opened a pull request:

    https://github.com/apache/karaf/pull/298

    Added "jaas:whoami" command, to inspect JAAS principals.

    This is my attempt at resolving issue 
[KARAF-3270](https://issues.apache.org/jira/browse/KARAF-3270).
    
    It adds a "jaas:whoami" command.  By default, it returns the names all the 
principals of type "UserPrincipal".  Typically there will be only one and it 
will be the logged-in user (eg. "karaf").  If you give it "-g" or "-r", it will 
list the groups or roles instead (so by default, "whoami -r" would return 
vewer, manager, admin, systembundles).  If you give it "-a", it'll report on 
every JAAS Principal in the current Subject, even if it's of a type that 
doesn't have meaning to Karaf itself (eg. a Kerberos principal), along with the 
class of each principal.
    
    (I needed it to debug the arguably complex authn/authz we're trying to set 
up right now at Carnegie Mellon.)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dfjdejulio/karaf master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/karaf/pull/298.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #298
    
----
commit 203ad3ac73933749c8e4cef44dd19e675f25dc3d
Author: Doug DeJulio <d...@cmu.edu>
Date:   2017-05-10T16:26:29Z

    Added "jaas:whoami" command, to inspect JAAS principals (ie. 
user/group/role).

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to