felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: [GOGO] Intercepting commands
Date Sat, 03 Mar 2018 21:52:43 GMT
Apache karaf has something like this.
It uses a find hook to intercept services and add jaas + ACL based security


Actually I think this is something we could also build into felix gogo.


2018-03-02 7:03 GMT+01:00 David Leangen <osgi@leangen.net>:

> Hi!
> I would like to implement a security feature in the command line, much
> like I would do in a servlet. Is there an easy way to intercept command
> calls so I can wrap each call with the security feature?
> Right now, I have to do something like this for each command method in my
> component:
> return auth.call( () -> {
>    [code goes here];
> });
> It would be preferable to do this just once for all commands, rather than
> having to wrap each command individually. I would prefer not to have to use
> a proxy object (makes it harder to debug) or create my own whiteboard
> service host (a bit heavy-handed, taking the code further away from GOGO).
> Cheers,
> =David

Christian Schneider

Computer Scientist

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message