<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Warning: DBMS_LDAP.simple_bind_s/ APEX_LDAP.authenticate and NULL password</title>
	<atom:link href="http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/</link>
	<description>Inside Oracle APEX - a blog that helps to get more out of Oracle Application Express (APEX) for your daily development work!</description>
	<lastBuildDate>Mon, 19 Dec 2011 12:04:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: kirik17</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-25535</link>
		<dc:creator>kirik17</dc:creator>
		<pubDate>Thu, 11 Feb 2010 09:42:09 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-25535</guid>
		<description>DBMS_LDAP.simple_bind_s  hangs on APEX installed on oracle 11g. and it&#039;s impossible to find any solution for AD authentication on this configuration. Do you know any workarounds?

here is a discussion http://forums.oracle.com/forums/thread.jspa?threadID=657706&amp;start=0&amp;tstart=0

thanks</description>
		<content:encoded><![CDATA[<p>DBMS_LDAP.simple_bind_s  hangs on APEX installed on oracle 11g. and it&#8217;s impossible to find any solution for AD authentication on this configuration. Do you know any workarounds?</p>
<p>here is a discussion <a href="http://forums.oracle.com/forums/thread.jspa?threadID=657706&#038;start=0&#038;tstart=0" rel="nofollow" target="_blank" class="liexternal">http://forums.oracle.com/forums/thread.jspa?threadID=657706&#038;start=0&#038;tstart=0</a></p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john scott</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1151</link>
		<dc:creator>john scott</dc:creator>
		<pubDate>Sat, 12 Jan 2008 12:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1151</guid>
		<description>Rodney,

&quot;MUST support&quot; is not the same as &quot;MUST be enabled&quot;, &quot;MUST support&quot; implies that the LDAP server must be able to handle it if it is enabled.

Sure the client should do some detection too, if necessary, however my view is that disabling anonymous binds on the server makes much of this argument moot.

Also, section 5.1.2 of the RFC quotes -

&quot;Additionally, Servers SHOULD by default fail Unauthenticated Bind requests with a resultCode of unwillingToPerform&quot;

Which is open to a little bit of interpretation, but suggests (to me) that the default should be that the Server fails unauthenticated binds (i.e default is &#039;off&#039;, with the option to turn it on).

Many LDAP servers do indeed ship with anonymous binds disabled, infact Windows 2003 Domain Controllers should ship with anonymous binds disabled (of course you can then enable if you like) -

http://support.microsoft.com/default.aspx?scid=326690

So it sounds like Patricks AD is either an earlier version (where anonymous binds were enabled by default perhaps), or has been manually enabled for anonymous binds.

John.</description>
		<content:encoded><![CDATA[<p>Rodney,</p>
<p>&#8220;MUST support&#8221; is not the same as &#8220;MUST be enabled&#8221;, &#8220;MUST support&#8221; implies that the LDAP server must be able to handle it if it is enabled.</p>
<p>Sure the client should do some detection too, if necessary, however my view is that disabling anonymous binds on the server makes much of this argument moot.</p>
<p>Also, section 5.1.2 of the RFC quotes -</p>
<p>&#8220;Additionally, Servers SHOULD by default fail Unauthenticated Bind requests with a resultCode of unwillingToPerform&#8221;</p>
<p>Which is open to a little bit of interpretation, but suggests (to me) that the default should be that the Server fails unauthenticated binds (i.e default is &#8216;off&#8217;, with the option to turn it on).</p>
<p>Many LDAP servers do indeed ship with anonymous binds disabled, infact Windows 2003 Domain Controllers should ship with anonymous binds disabled (of course you can then enable if you like) -</p>
<p><a href="http://support.microsoft.com/default.aspx?scid=326690" rel="nofollow" target="_blank" class="liexternal">http://support.microsoft.com/default.aspx?scid=326690</a></p>
<p>So it sounds like Patricks AD is either an earlier version (where anonymous binds were enabled by default perhaps), or has been manually enabled for anonymous binds.</p>
<p>John.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodney</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1150</link>
		<dc:creator>Rodney</dc:creator>
		<pubDate>Sat, 12 Jan 2008 12:32:44 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1150</guid>
		<description>Here&#039;s an except from RFC 4513: &quot;LDAP server implementations MUST support the anonymous authentication mechanism of the simple Bind method (Section 5.1.1).&quot;

I&#039;m not sure a standards-conforming LDAP server can disable anonymous binds. However, this discussion is really about &quot;Unauthenticated Authentication&quot; binds described in section 5.1.2. This mechanism is selected by passing a non-zero length DN and a zero-length password.

I don&#039;t see anything indicating that a server must implement this mechanism; however, section 6.3.1 explicitly addresses the concerns raised here and says &quot;Clients that use the results from a simple Bind operation to make authorization decisions should actively detect unauthenticated Bind requests (by verifying that the supplied password is not empty) and react appropriately.&quot;

When this thread was brought to my attention, I was a bit surprised too; however, it appears the protocol has some features that must be accounted for when one is using a bind against an LDAP server as a way of proving that a user is who he/she says.

Rodney</description>
		<content:encoded><![CDATA[<p>Here&#8217;s an except from RFC 4513: &#8220;LDAP server implementations MUST support the anonymous authentication mechanism of the simple Bind method (Section 5.1.1).&#8221;</p>
<p>I&#8217;m not sure a standards-conforming LDAP server can disable anonymous binds. However, this discussion is really about &#8220;Unauthenticated Authentication&#8221; binds described in section 5.1.2. This mechanism is selected by passing a non-zero length DN and a zero-length password.</p>
<p>I don&#8217;t see anything indicating that a server must implement this mechanism; however, section 6.3.1 explicitly addresses the concerns raised here and says &#8220;Clients that use the results from a simple Bind operation to make authorization decisions should actively detect unauthenticated Bind requests (by verifying that the supplied password is not empty) and react appropriately.&#8221;</p>
<p>When this thread was brought to my attention, I was a bit surprised too; however, it appears the protocol has some features that must be accounted for when one is using a bind against an LDAP server as a way of proving that a user is who he/she says.</p>
<p>Rodney</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john scott</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1149</link>
		<dc:creator>john scott</dc:creator>
		<pubDate>Sat, 12 Jan 2008 12:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1149</guid>
		<description>Patrick,

&gt;do you think that the average APEX developer will
&gt;know about that behavior if he just wants to do
&gt;simple LDAP integration in an custom authorization
&gt;scheme?

No, I don&#039;t expect the average APEX developer to know about that...

However....I most certainly expect the LDAP Administrator to know about the impact of allowing anonymous binds.

In a case where the APEX Developer *was* the same person as the LDAP Administrator, then yes...they should know about anonymous binds.

That was my point, when you use LDAP Authentication in APEX you are effectively saying &quot;I wish to defer the maintenance and authentication of my users to another system/repository&quot; and in that respect you have to assume that the person responsible for maintaining that repository (in this case the LDAP Directory) knows what they are doing.

There is no right or wrong answer as to whether anonymous binds should be allowed or disallowed, it&#039;s purely an internal decision that needs to be made, based on whether you have other systems that require anonymous binds to be used or not (personally I&#039;m not a fan of anonymous binds, however they serve a purpose).

One of the best pieces of advice I could give to anyone starting to integrate their APEX apps with their LDAP directory is to work closely with your LDAP administrator, because it will make your life much much easier (as I don&#039;t expect the average APEX developer to already know the specific DN&#039;s and LDAP attributes they need to use, however your LDAP administrator should be able to guide you on that).

You&#039;re looking purely at the APEX app perspective here, sure you could take the NULL password into account and have the authenticate routines pass back false, however don&#039;t forget that the LDAP directory could (and likely is) be used by many *many* other systems, such as SSH servers, Windows domain login, Email account authentication and so on, all of these systems can be written in a variety of languages, C, Perl, .NET etc.......

My point? Well...if your LDAP server allows anonymous binds then it will allow anonymous to any of these systems (unless they perform the explicit check themselves). Even if those systems do perform a special check themselves, someone could easily code up some Perl code (or whatever) to perform an anonymous bind in just a few lines of code.

You could easily write your own wrapper around the APEX routines to add a check for NULL password, however if you really want to disallow anonymous binds the place to do it is at the LDAP server.

John.</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>>do you think that the average APEX developer will<br />
>know about that behavior if he just wants to do<br />
>simple LDAP integration in an custom authorization<br />
>scheme?</p>
<p>No, I don&#8217;t expect the average APEX developer to know about that&#8230;</p>
<p>However&#8230;.I most certainly expect the LDAP Administrator to know about the impact of allowing anonymous binds.</p>
<p>In a case where the APEX Developer *was* the same person as the LDAP Administrator, then yes&#8230;they should know about anonymous binds.</p>
<p>That was my point, when you use LDAP Authentication in APEX you are effectively saying &#8220;I wish to defer the maintenance and authentication of my users to another system/repository&#8221; and in that respect you have to assume that the person responsible for maintaining that repository (in this case the LDAP Directory) knows what they are doing.</p>
<p>There is no right or wrong answer as to whether anonymous binds should be allowed or disallowed, it&#8217;s purely an internal decision that needs to be made, based on whether you have other systems that require anonymous binds to be used or not (personally I&#8217;m not a fan of anonymous binds, however they serve a purpose).</p>
<p>One of the best pieces of advice I could give to anyone starting to integrate their APEX apps with their LDAP directory is to work closely with your LDAP administrator, because it will make your life much much easier (as I don&#8217;t expect the average APEX developer to already know the specific DN&#8217;s and LDAP attributes they need to use, however your LDAP administrator should be able to guide you on that).</p>
<p>You&#8217;re looking purely at the APEX app perspective here, sure you could take the NULL password into account and have the authenticate routines pass back false, however don&#8217;t forget that the LDAP directory could (and likely is) be used by many *many* other systems, such as SSH servers, Windows domain login, Email account authentication and so on, all of these systems can be written in a variety of languages, C, Perl, .NET etc&#8230;&#8230;.</p>
<p>My point? Well&#8230;if your LDAP server allows anonymous binds then it will allow anonymous to any of these systems (unless they perform the explicit check themselves). Even if those systems do perform a special check themselves, someone could easily code up some Perl code (or whatever) to perform an anonymous bind in just a few lines of code.</p>
<p>You could easily write your own wrapper around the APEX routines to add a check for NULL password, however if you really want to disallow anonymous binds the place to do it is at the LDAP server.</p>
<p>John.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Wolf</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1148</link>
		<dc:creator>Patrick Wolf</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1148</guid>
		<description>John,

do you think that the average APEX developer will know about that behavior if he just wants to do simple LDAP integration in an custom authorization scheme?

I doubt not.

Would be interesting to know how many production applications are out there where this problem exists... Hopefully they all have a good QA department which captured that!

Patrick</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>do you think that the average APEX developer will know about that behavior if he just wants to do simple LDAP integration in an custom authorization scheme?</p>
<p>I doubt not.</p>
<p>Would be interesting to know how many production applications are out there where this problem exists&#8230; Hopefully they all have a good QA department which captured that!</p>
<p>Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john scott</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1147</link>
		<dc:creator>john scott</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1147</guid>
		<description>Dan,

Buried away in the LDAP server specifications somewhere I believe that it is &#039;correct&#039; to allow an anonymous bind even if a username (i.e DN in this case) is passed in.

In other words, if you pass in a full DN and leave the password as NULL, then an LDAP directory server which supports anonymous binds will consider this a request to perform an anonymous bind (by virtue of the password being NULL), the fact that a DN has been passed in doesn&#039;t really come into it.

Again, I don&#039;t really see this as a flaw in APEX_LDAP since it is sort of conforming to the way an LDAP server supports anonymous binds.

I see the &#039;quick solution&#039; if you don&#039;t want to allow NULL passwords to treated as an anonymous binds is to disable anonymous binds.

John</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Buried away in the LDAP server specifications somewhere I believe that it is &#8216;correct&#8217; to allow an anonymous bind even if a username (i.e DN in this case) is passed in.</p>
<p>In other words, if you pass in a full DN and leave the password as NULL, then an LDAP directory server which supports anonymous binds will consider this a request to perform an anonymous bind (by virtue of the password being NULL), the fact that a DN has been passed in doesn&#8217;t really come into it.</p>
<p>Again, I don&#8217;t really see this as a flaw in APEX_LDAP since it is sort of conforming to the way an LDAP server supports anonymous binds.</p>
<p>I see the &#8216;quick solution&#8217; if you don&#8217;t want to allow NULL passwords to treated as an anonymous binds is to disable anonymous binds.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john scott</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1146</link>
		<dc:creator>john scott</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1146</guid>
		<description>Depends how you look at it really, APEX_LDAP.AUTHENTICATE is deferring the credentials checking to the LDAP server. Your LDAP server is supporting anonymous binds, therefore passing a null across is handled as an anonymous bind, ergo authentication succeeds.

Turning off anonymous binds would cause the &#039;correct&#039; behavior that you want from the APEX_LDAP.authenticate routine.

John.</description>
		<content:encoded><![CDATA[<p>Depends how you look at it really, APEX_LDAP.AUTHENTICATE is deferring the credentials checking to the LDAP server. Your LDAP server is supporting anonymous binds, therefore passing a null across is handled as an anonymous bind, ergo authentication succeeds.</p>
<p>Turning off anonymous binds would cause the &#8216;correct&#8217; behavior that you want from the APEX_LDAP.authenticate routine.</p>
<p>John.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Norris</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1145</link>
		<dc:creator>Dan Norris</dc:creator>
		<pubDate>Thu, 10 Jan 2008 21:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1145</guid>
		<description>My issue with the behavior demonstrated here is that he didn&#039;t do an anonymous authentication. He gave a DN (at least in the first case, using DBMS_LDAP). However, when that didn&#039;t work, it did a fall back to anonymous. That&#039;s really where the flaw is IMHO. You shouldn&#039;t have to disable anonymous binding in order to return a proper code. It should fail to authenticate either way. If you want an anonymous bind, then don&#039;t pass a DN. If you pass a DN, you obviously are trying not to be anonymous!</description>
		<content:encoded><![CDATA[<p>My issue with the behavior demonstrated here is that he didn&#8217;t do an anonymous authentication. He gave a DN (at least in the first case, using DBMS_LDAP). However, when that didn&#8217;t work, it did a fall back to anonymous. That&#8217;s really where the flaw is IMHO. You shouldn&#8217;t have to disable anonymous binding in order to return a proper code. It should fail to authenticate either way. If you want an anonymous bind, then don&#8217;t pass a DN. If you pass a DN, you obviously are trying not to be anonymous!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Wolf</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1144</link>
		<dc:creator>Patrick Wolf</dc:creator>
		<pubDate>Thu, 10 Jan 2008 21:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1144</guid>
		<description>Maybe I have to be more precise, I&#039;m not talking about adding a password IS NOT NULL check for all the APEX_LDAP procedures/functions, just for the APEX_LDAP.authenticate.

For the other functions like APEX_LDAP.is_member it&#039;s ok to pass NULL in case you have anonymous bind enabled on your LDAP server.

But the APEX_LDAP.authenticate is security relevant and only used for authentication, that&#039;s its purpose. Why should I want to allow anonymous authentication there? The built-in LDAP authentication scheme does the check, and I think by purpose.

Patrick</description>
		<content:encoded><![CDATA[<p>Maybe I have to be more precise, I&#8217;m not talking about adding a password IS NOT NULL check for all the APEX_LDAP procedures/functions, just for the APEX_LDAP.authenticate.</p>
<p>For the other functions like APEX_LDAP.is_member it&#8217;s ok to pass NULL in case you have anonymous bind enabled on your LDAP server.</p>
<p>But the APEX_LDAP.authenticate is security relevant and only used for authentication, that&#8217;s its purpose. Why should I want to allow anonymous authentication there? The built-in LDAP authentication scheme does the check, and I think by purpose.</p>
<p>Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john scott</title>
		<link>http://www.inside-oracle-apex.com/dbms_ldapsimple_bind_s-apex_ldapauthenticate-and-null-password/comment-page-1/#comment-1143</link>
		<dc:creator>john scott</dc:creator>
		<pubDate>Thu, 10 Jan 2008 21:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://final.inside-oracle-apex.com/en/post/warning-dbms_ldapsimple_bind_sapex_ldapauthenticate-and-null-password/#comment-1143</guid>
		<description>It&#039;s not really a flaw/backdoor in APEX_LDAP, remember it is your LDAP server that is the one that is saying it is ok to bind anonymously.

As I say your LDAP administrator can change this behaviour (I wouldn&#039;t really want the APEX_LDAP package to try and second-guess what the anonymous binding policy was).

John</description>
		<content:encoded><![CDATA[<p>It&#8217;s not really a flaw/backdoor in APEX_LDAP, remember it is your LDAP server that is the one that is saying it is ok to bind anonymously.</p>
<p>As I say your LDAP administrator can change this behaviour (I wouldn&#8217;t really want the APEX_LDAP package to try and second-guess what the anonymous binding policy was).</p>
<p>John</p>
]]></content:encoded>
	</item>
</channel>
</rss>

