You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@knox.apache.org by Matteo Alessandroni <sk...@apache.org> on 2019/03/12 11:36:55 UTC

Extract currently authenticated user and call an external REST service upon requests

Hi,

I would like to understand whether the following scenario is possible 
with Knox:

I want to use Knox to provide user authentication.
When a user make a REST request to Knox, I would like to have a logic 
that catches the just authenticated user and call an external REST 
service passing the username of the current user.

Is there a way to do that in Knox?
I'm looking at the "Extension" section [1] and e.g. the "Hadoop session" 
object seems promising, but I'm not sure, do you think it could be 
useful for my needs?
If positive, it would be better for me to use Java instead of 
Groovy.Plus, I see the "org.apache.knox.gateway.shell.Hadoop" class is 
"@Deprecated" [2], so I guess there are better alternatives!

I would need your help to better understand the feasibility of what I 
need and, if possible, to be addressed to a possible solution!

Thanks in advance.
Best regards,
Matteo

[1] https://knox.apache.org/books/knox-1-2-0/user-guide.html#Extension
[2] 
https://github.com/apache/knox/blob/v1.2.0/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Hadoop.java#L25


-- 

Dott. Matteo Alessandroni

Software Engineer @ Tirasa S.r.l.

Viale Vittoria Colonna, 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173

http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/phonebook.html?uid=skylark17 
<http://people.apache.org/phonebook.html?uid=skylark17>

Tirasa S.r.l. <http://www.tirasa.net>