InitialContext without CREDENTIALS in WL8.1 2004-07-22 - By Hyne, David
Back That depends on whether you're in the .war deployed inside the container or outside the container. D __ ____ ____ ____ ____ ____ ____
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)] On Behalf Of Vinod G Sent: Thursday, July 22, 2004 5:34 AM To: J2EE-INTEREST@(protected) Subject: InitialContext without CREDENTIALS in WL8.1
Hi All,
In weblogic 8.1 I disabled guest login. Then if I try to create an InitalContext to the server with specifying only the INITIAL_CONTEXT_FACTORY and PROVIDER_URL (i.e NO SECUITY_CREDENTIALS and SECURITY_PRINCIPAL ), I am able to create it. I expected to get a secuity exception saying user guest is not authenticated.
Simple code which I used is shown .
Properties p = System.getProperties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFac tory"); p.put(Context.PROVIDER_URL,"t3://localhost:7001/");
InitialContext ic = new InitialContext(p);
System.out.println("Got Context "+ic);
Javadoc of weblogic.jndi.WLInitialContextFactory says if no CREDENTIAL and PRINCIPAL is specified it defaults to guest/guest. The why is it still alows the unauthorized user to access the context.
Anybody faced the same problem earlier?
Thanks Regards Vinod G
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
This email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies.
==============================================================================
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 5.50.4937.800" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><FONT face=Verdana color=#000080 size=2></FONT> </DIV> <DIV dir=ltr align=left><SPAN class=884393420-22072004><FONT face=Verdana color=#000080 size=2>That depends on whether you're in the .war deployed inside the container or outside the container. </FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=884393420-22072004></SPAN><SPAN class=884393420-22072004><FONT face=Verdana color=#000080 size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=884393420-22072004><FONT face=Verdana color=#000080 size=2>D</FONT></SPAN></DIV> <DIV dir=ltr align=left> <HR tabIndex=-1> <FONT face=Tahoma size=2><B>From:</B> A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)] <B>On Behalf Of </B >Vinod G<BR><B>Sent:</B> Thursday, July 22, 2004 5:34 AM<BR><B>To:</B> J2EE-INTEREST@(protected)<BR><B>Subject:</B> InitialContext without CREDENTIALS in WL8.1<BR></FONT><BR></DIV> <DIV></DIV><BR><FONT face=sans-serif size=2>Hi All,</FONT> <BR><BR><FONT face=sans-serif size=2>In weblogic 8.1 I disabled guest login. Then if I try to create an InitalContext to the server with specifying only the INITIAL_CONTEXT_FACTORY and PROVIDER_URL (i.e NO SECUITY_CREDENTIALS and SECURITY_PRINCIPAL ), I am able to create it. I expected to get a secuity exception saying user guest is not authenticated. </FONT><BR><BR><FONT face=sans-serif size=2>Simple code which I used is shown .</FONT> <BR><BR><FONT face=sans-serif size=2> Properties p = System.getProperties();</FONT> <BR><FONT face=sans-serif size=2> p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); </FONT> <BR><FONT face=sans-serif size=2> p.put(Context.PROVIDER_URL,"t3://localhost:7001/");</FONT> <BR><BR><FONT face=sans-serif size=2> InitialContext ic = new InitialContext(p);</FONT> <BR><BR><FONT face=sans-serif size=2> System.out.println("Got Context "+ic);</FONT> <BR><BR><FONT face=sans-serif size=2>Javadoc of weblogic.jndi.WLInitialContextFactory says if no CREDENTIAL and PRINCIPAL is specified it defaults to guest/guest. The why is it still alows the unauthorized user to access the context.</FONT> <BR><BR><FONT face=sans-serif size=2>Anybody faced the same problem earlier?</FONT> <BR><BR><FONT face=sans-serif size=2>Thanks</FONT> <BR><FONT face=sans-serif size=2>Regards</FONT> <BR><FONT face=sans-serif size=2>Vinod G</FONT></BODY></HTML>
<P>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- --<br> <br> This email is confidential and may be legally privileged.<br> <br> It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized.<br> <br> If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies.<br> <br> ============================================================================== <br> </P> =========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <p>
|
|