This particular option really is about client behaviour, not server
behaviour, so what you're seeing is probably the intended behaviour. The
developer of a web application does have other approaches available for
ensuring that cookies only get transmitted from the server when appropriate.
That said, far too many developers are blissfully unaware of such issues,
and adding server-side protection certainly wouldn't hurt*. Why not submit
a suggestion at http://lab.msdn.microsoft.com/ProductFeedback/ if you think
it ought to be added?
*Although I suspect it would end up being added as a separate option in
order to avoid potential problems in existing applications.
> The "secure" cookie option dictates that the value of the cookie should
> only
[quoted text clipped - 23 lines]
> regards,
> Jas
Jas - 02 Jan 2006 00:00 GMT
Nicole,
Agreed. It's not a requirement as per the RFC but it would add to the
security. As you recommended, I have filed a suggestion. If you can could
you vote on it. The suggestion ID is FDBK43174.
regards,
Jas
> This particular option really is about client behaviour, not server
> behaviour, so what you're seeing is probably the intended behaviour. The
[quoted text clipped - 35 lines]
> > regards,
> > Jas
Dominick Baier [DevelopMentor] - 02 Jan 2006 19:19 GMT
Hi,
this is at least an inconsistency -
FormsAuthentication.SetAuthCookie enforces SSL when setting the auth ticket.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Nicole,
>
[quoted text clipped - 50 lines]
>>> regards,
>>> Jas
Dominick Baier [DevelopMentor] - 02 Jan 2006 21:22 GMT
hi,
i mean when requireSSL is set to true.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Hi,
>
[quoted text clipped - 60 lines]
>>>> regards,
>>>> Jas
Jas - 05 Jan 2006 01:50 GMT
Dominick,
I checked up on this and confirmed that the issue exists with
FormsAuthentication.SetAuthCookie as well. Even when requireSSL is set to
true in web.config. The initial "set-cookie" header sent from the server to
the client can be sent over HTTP. It just dictates that the client will not
send the cookie to the server on all requests. But this doesn't matter cause
an attacker can just sniff the cookie on the initial "set-cookie" header from
the server.
jas
> hi,
>
[quoted text clipped - 14 lines]
> > Dominick Baier - DevelopMentor
> > http://www.leastprivilege.com
Dominick Baier [DevelopMentor] - 05 Jan 2006 06:31 GMT
Hi,
no - i cannot confirm - at least in 2.0
this is part of the source of SetAuthCookie:
if (!context1.Request.IsSecureConnection && FormsAuthentication.RequireSSL)
{
throw new HttpException(SR.GetString("Connection_not_secure_creating_secure_cookie"));
}
haven't checked for 1.1, though
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Dominick,
>
[quoted text clipped - 25 lines]
>>> Dominick Baier - DevelopMentor
>>> http://www.leastprivilege.co
Nicole Calinoiu - 05 Jan 2006 12:11 GMT
It looks like 1.1 doesn't apply the same verification (looked at decompiled
assembly, but didn't test it).
> Hi,
> no - i cannot confirm - at least in 2.0
[quoted text clipped - 43 lines]
>>>> Dominick Baier - DevelopMentor
>>>> http://www.leastprivilege.com
Jas - 05 Jan 2006 14:50 GMT
Dominick,
Yes, I should have specified - I was talking about 1.1. I tested it out in
a lab environment.
jas
> It looks like 1.1 doesn't apply the same verification (looked at decompiled
> assembly, but didn't test it).
[quoted text clipped - 28 lines]
> >>
> >> jas