You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Muruga Prabu M <mu...@gmail.com> on 2011/01/13 05:46:31 UTC
Accessing Hadoop using Kerberos
Hi,
I have a Java program to upload and download files from the HDFS. I am using
Hadoop with Kerberos. I am able to get a TGT(From the Authentication Server
) and a service Ticket(From Ticket Granting server) using kerberos
successfully. But after that I don't know how to authenticate myself with
Hadoop. Can anyone please help me how to do it ?
Regards,
Pikini
Re: Accessing Hadoop using Kerberos
Posted by Muruga Prabu M <mu...@gmail.com>.
Yes. I want some help in those lines. How to use UserGroupInformation class.
Regards,
Pikini
On Wed, Jan 12, 2011 at 10:32 PM, Alejandro Abdelnur <tu...@cloudera.com>wrote:
> Hadoop UserGroupInformation class looks into the OS Kerberos cache for user
> to use.
>
> I guess you'd had to do the kerberos authentication making sure the
> kerberos
> cache is used and then do a UserGroupInformation.loginUser()
>
> And after doing that the Hadoop libraries should work.
>
> Alejandro
>
> On Thu, Jan 13, 2011 at 2:19 PM, Muruga Prabu M <murugaprabum@gmail.com
> >wrote:
>
> > Yeah kinit is working fine. My scenario is as follows. I have a java
> > program
> > written by me to upload and download files to the HDFS cluster. I want to
> > perform Kerberos authentication from the Java code itself. I have
> acquired
> > the TicketGrantingTicket from the Authentication Server and Service
> Ticket
> > from the Ticket Granting Server. Now how to authenticate myself with
> hadoop
> > by sending the service ticket received from the Ticket Granting Server.
> >
> > Regards,
> > Pikini
> >
> > On Wed, Jan 12, 2011 at 10:13 PM, Alejandro Abdelnur <tucu@cloudera.com
> > >wrote:
> >
> > > If you kinit-ed successfully you are done.
> > >
> > > The hadoop libraries will do the trick of authenticating the user
> against
> > > Hadoop.
> > >
> > > Alejandro
> > >
> > >
> > > On Thu, Jan 13, 2011 at 12:46 PM, Muruga Prabu M <
> murugaprabum@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > I have a Java program to upload and download files from the HDFS. I
> am
> > > > using
> > > > Hadoop with Kerberos. I am able to get a TGT(From the Authentication
> > > Server
> > > > ) and a service Ticket(From Ticket Granting server) using kerberos
> > > > successfully. But after that I don't know how to authenticate myself
> > with
> > > > Hadoop. Can anyone please help me how to do it ?
> > > >
> > > > Regards,
> > > > Pikini
> > > >
> > >
> >
>
Re: Accessing Hadoop using Kerberos
Posted by Alejandro Abdelnur <tu...@cloudera.com>.
Hadoop UserGroupInformation class looks into the OS Kerberos cache for user
to use.
I guess you'd had to do the kerberos authentication making sure the kerberos
cache is used and then do a UserGroupInformation.loginUser()
And after doing that the Hadoop libraries should work.
Alejandro
On Thu, Jan 13, 2011 at 2:19 PM, Muruga Prabu M <mu...@gmail.com>wrote:
> Yeah kinit is working fine. My scenario is as follows. I have a java
> program
> written by me to upload and download files to the HDFS cluster. I want to
> perform Kerberos authentication from the Java code itself. I have acquired
> the TicketGrantingTicket from the Authentication Server and Service Ticket
> from the Ticket Granting Server. Now how to authenticate myself with hadoop
> by sending the service ticket received from the Ticket Granting Server.
>
> Regards,
> Pikini
>
> On Wed, Jan 12, 2011 at 10:13 PM, Alejandro Abdelnur <tucu@cloudera.com
> >wrote:
>
> > If you kinit-ed successfully you are done.
> >
> > The hadoop libraries will do the trick of authenticating the user against
> > Hadoop.
> >
> > Alejandro
> >
> >
> > On Thu, Jan 13, 2011 at 12:46 PM, Muruga Prabu M <murugaprabum@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > I have a Java program to upload and download files from the HDFS. I am
> > > using
> > > Hadoop with Kerberos. I am able to get a TGT(From the Authentication
> > Server
> > > ) and a service Ticket(From Ticket Granting server) using kerberos
> > > successfully. But after that I don't know how to authenticate myself
> with
> > > Hadoop. Can anyone please help me how to do it ?
> > >
> > > Regards,
> > > Pikini
> > >
> >
>
Re: Accessing Hadoop using Kerberos
Posted by Muruga Prabu M <mu...@gmail.com>.
Yeah kinit is working fine. My scenario is as follows. I have a java program
written by me to upload and download files to the HDFS cluster. I want to
perform Kerberos authentication from the Java code itself. I have acquired
the TicketGrantingTicket from the Authentication Server and Service Ticket
from the Ticket Granting Server. Now how to authenticate myself with hadoop
by sending the service ticket received from the Ticket Granting Server.
Regards,
Pikini
On Wed, Jan 12, 2011 at 10:13 PM, Alejandro Abdelnur <tu...@cloudera.com>wrote:
> If you kinit-ed successfully you are done.
>
> The hadoop libraries will do the trick of authenticating the user against
> Hadoop.
>
> Alejandro
>
>
> On Thu, Jan 13, 2011 at 12:46 PM, Muruga Prabu M <murugaprabum@gmail.com
> >wrote:
>
> > Hi,
> >
> > I have a Java program to upload and download files from the HDFS. I am
> > using
> > Hadoop with Kerberos. I am able to get a TGT(From the Authentication
> Server
> > ) and a service Ticket(From Ticket Granting server) using kerberos
> > successfully. But after that I don't know how to authenticate myself with
> > Hadoop. Can anyone please help me how to do it ?
> >
> > Regards,
> > Pikini
> >
>
Re: Accessing Hadoop using Kerberos
Posted by Alejandro Abdelnur <tu...@cloudera.com>.
If you kinit-ed successfully you are done.
The hadoop libraries will do the trick of authenticating the user against
Hadoop.
Alejandro
On Thu, Jan 13, 2011 at 12:46 PM, Muruga Prabu M <mu...@gmail.com>wrote:
> Hi,
>
> I have a Java program to upload and download files from the HDFS. I am
> using
> Hadoop with Kerberos. I am able to get a TGT(From the Authentication Server
> ) and a service Ticket(From Ticket Granting server) using kerberos
> successfully. But after that I don't know how to authenticate myself with
> Hadoop. Can anyone please help me how to do it ?
>
> Regards,
> Pikini
>