You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Max Bridgewater <ma...@gmail.com> on 2015/11/22 23:42:12 UTC

Simple Authentication failing between UI and Nimbus

Hi,

I am trying to get simple authentication to work with Storm 0.10.0. My
config is as follows:

================
nimbus.authorizer:
"backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
 supervisor.run.worker.as.user: true
 ui.filter:
"org.apache.hadoop.security.authentication.server.AuthenticationFilter"
 ui.filter.params:
   "type": "simple"
   "user.name": "willy"
==================

I call the UI as: http://localhost:8080/index.html?user.name=willy

If I remove the nimbus.authorizer from storm.yaml, every works fine. But
then all users can see all topologies.  Now, when I add this flag back, I
run into an issue wherein, the user name is not passed from storm ui to
nimbus.

This results in following exception in nimbus.log:


2015-11-22 17:28:54.746 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 2]
Access  fro
m: null op:getNimbusConf
2015-11-22 17:28:54.743 o.a.t.s.AbstractNonblockingServer$FrameBuffer
[ERROR] Un
expected throwable while invoking!
java.lang.NullPointerException
        at
backtype.storm.security.auth.authorizer.SimpleACLAuthorizer.permit(Si
mpleACLAuthorizer.java:99) ~[storm-core-0.10.0.jar:0.10.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.7.0_85]



Note that the UI does recognize the user as the principal; us.log shows:

2015-11-22 17:28:54.272 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 3]
Access  fro
m: null principal:willy op:getClusterInfo
2015-11-22 17:28:54.277 b.s.thrift [INFO] Connecting to Nimbus at
localhost:6627
 as user:
2015-11-22 17:28:54.278 b.s.u.Utils [INFO] Using defaults.yaml from
resources
2015-11-22 17:28:54.321 b.s.s.a.DefaultHttpCredentialsPlugin [DEBUG] HTTP
reques
t had user (willy)
2015-11-22 17:28:54.332 b.s.thrift [INFO] Connecting to Nimbus at
localhost:6627
 as user: willy

So, it seems the principal is not making it all the way to nimbus. Is there
a config flag that I am missing?

Thanks,
Max.

Re: Simple Authentication failing between UI and Nimbus

Posted by Max Bridgewater <ma...@gmail.com>.
Ooops. Sorry. Meant to be storm user group.

Thanks,
Max.

On Mon, Nov 23, 2015 at 1:49 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> This is the Apache Camel user mailing list. I think you may have
> posted your question on the wrong place.
>
> On Sun, Nov 22, 2015 at 11:42 PM, Max Bridgewater
> <ma...@gmail.com> wrote:
> > Hi,
> >
> > I am trying to get simple authentication to work with Storm 0.10.0. My
> > config is as follows:
> >
> > ================
> > nimbus.authorizer:
> > "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
> >  supervisor.run.worker.as.user: true
> >  ui.filter:
> > "org.apache.hadoop.security.authentication.server.AuthenticationFilter"
> >  ui.filter.params:
> >    "type": "simple"
> >    "user.name": "willy"
> > ==================
> >
> > I call the UI as: http://localhost:8080/index.html?user.name=willy
> >
> > If I remove the nimbus.authorizer from storm.yaml, every works fine. But
> > then all users can see all topologies.  Now, when I add this flag back, I
> > run into an issue wherein, the user name is not passed from storm ui to
> > nimbus.
> >
> > This results in following exception in nimbus.log:
> >
> >
> > 2015-11-22 17:28:54.746 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 2]
> > Access  fro
> > m: null op:getNimbusConf
> > 2015-11-22 17:28:54.743 o.a.t.s.AbstractNonblockingServer$FrameBuffer
> > [ERROR] Un
> > expected throwable while invoking!
> > java.lang.NullPointerException
> >         at
> > backtype.storm.security.auth.authorizer.SimpleACLAuthorizer.permit(Si
> > mpleACLAuthorizer.java:99) ~[storm-core-0.10.0.jar:0.10.0]
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > ~[?:1.7.0_85]
> >
> >
> >
> > Note that the UI does recognize the user as the principal; us.log shows:
> >
> > 2015-11-22 17:28:54.272 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 3]
> > Access  fro
> > m: null principal:willy op:getClusterInfo
> > 2015-11-22 17:28:54.277 b.s.thrift [INFO] Connecting to Nimbus at
> > localhost:6627
> >  as user:
> > 2015-11-22 17:28:54.278 b.s.u.Utils [INFO] Using defaults.yaml from
> > resources
> > 2015-11-22 17:28:54.321 b.s.s.a.DefaultHttpCredentialsPlugin [DEBUG] HTTP
> > reques
> > t had user (willy)
> > 2015-11-22 17:28:54.332 b.s.thrift [INFO] Connecting to Nimbus at
> > localhost:6627
> >  as user: willy
> >
> > So, it seems the principal is not making it all the way to nimbus. Is
> there
> > a config flag that I am missing?
> >
> > Thanks,
> > Max.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: Simple Authentication failing between UI and Nimbus

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

This is the Apache Camel user mailing list. I think you may have
posted your question on the wrong place.

On Sun, Nov 22, 2015 at 11:42 PM, Max Bridgewater
<ma...@gmail.com> wrote:
> Hi,
>
> I am trying to get simple authentication to work with Storm 0.10.0. My
> config is as follows:
>
> ================
> nimbus.authorizer:
> "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
>  supervisor.run.worker.as.user: true
>  ui.filter:
> "org.apache.hadoop.security.authentication.server.AuthenticationFilter"
>  ui.filter.params:
>    "type": "simple"
>    "user.name": "willy"
> ==================
>
> I call the UI as: http://localhost:8080/index.html?user.name=willy
>
> If I remove the nimbus.authorizer from storm.yaml, every works fine. But
> then all users can see all topologies.  Now, when I add this flag back, I
> run into an issue wherein, the user name is not passed from storm ui to
> nimbus.
>
> This results in following exception in nimbus.log:
>
>
> 2015-11-22 17:28:54.746 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 2]
> Access  fro
> m: null op:getNimbusConf
> 2015-11-22 17:28:54.743 o.a.t.s.AbstractNonblockingServer$FrameBuffer
> [ERROR] Un
> expected throwable while invoking!
> java.lang.NullPointerException
>         at
> backtype.storm.security.auth.authorizer.SimpleACLAuthorizer.permit(Si
> mpleACLAuthorizer.java:99) ~[storm-core-0.10.0.jar:0.10.0]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.7.0_85]
>
>
>
> Note that the UI does recognize the user as the principal; us.log shows:
>
> 2015-11-22 17:28:54.272 b.s.s.a.a.SimpleACLAuthorizer [INFO] [req 3]
> Access  fro
> m: null principal:willy op:getClusterInfo
> 2015-11-22 17:28:54.277 b.s.thrift [INFO] Connecting to Nimbus at
> localhost:6627
>  as user:
> 2015-11-22 17:28:54.278 b.s.u.Utils [INFO] Using defaults.yaml from
> resources
> 2015-11-22 17:28:54.321 b.s.s.a.DefaultHttpCredentialsPlugin [DEBUG] HTTP
> reques
> t had user (willy)
> 2015-11-22 17:28:54.332 b.s.thrift [INFO] Connecting to Nimbus at
> localhost:6627
>  as user: willy
>
> So, it seems the principal is not making it all the way to nimbus. Is there
> a config flag that I am missing?
>
> Thanks,
> Max.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2