Re: strange security role issue
- From: stcheng@xxxxxxxxxxxxxxxxxxxx ("Steven Cheng")
- Date: Wed, 12 Mar 2008 07:08:27 GMT
Thanks for your reply Jrl,
My pleasure. BTW, If you by any chance receive some feedback form about us,
we'd really appreciate your comments and feedback :)
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we
can improve the support we provide to you. Please feel free to let my
manager know what you think of
the level of service provided. You can send feedback directly to my manager
at: msdnmg@xxxxxxxxxxxxxx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
References: <HpNAj.64006$w94.13094@pd7urf2no><hinc7AmgIHA.5204@xxxxxxxxxxxxxxxxxxxxxx> <cr3Bj.66920$pM4.12946@pd7urf1no>
<WY7ZQTygIHA.4672@xxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <WY7ZQTygIHA.4672@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: strange security role issue
exists
Thanks very much, this cleared up the problem perfectly.
- count me as a 'delighted' customer!
""Steven Cheng"" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:WY7ZQTygIHA.4672@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for your reply Jrl,
From the <authorization> setting you provided below:
As for the authorization, here is the setting (from web.config in the
secured folder), for a section that should not be viewable by a new user
(but is) :
============
<authorization>
<allow roles="administrator" />
<deny roles="member" />
<deny roles="client" />
<deny users="?" />
</authorization>
=================
I found one problem( if you want to prevent new created user from viewing
the pages). Yes, a new created user has not roles associated with him.
However, he is a valid user and he is authenticated user(there also
addthe user rule besides role rules). In your authorization rules, you
asthe following ones:
** allow admin role
** deny member role
** denty client role
** deny unauthenticated user
However, what you've missed here? You haven't deny a normal authenticated
user(and a new created user is just a normal authenticated user if he is
login).
I suggest you change the authorization rules to the following one:
#you only allow admin role here and denty all other users
============
<authorization>
<allow roles="administrator" />
<deny users="*" />
</authorization>
=================
Actually a recommended pattern for authorization rules is first add all
the
roles/users you want to allow, then, add deny everyone in the last rule.
Best regards,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we
can improve the support we provide to you. Please feel free to let my
manager know what you think of
the level of service provided. You can send feedback directly to my
manager
at: msdnmg@xxxxxxxxxxxxxx
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
Newsgroups: microsoft.public.vsnet.general<hinc7AmgIHA.5204@xxxxxxxxxxxxxxxxxxxxxx>
References: <HpNAj.64006$w94.13094@pd7urf2no>
In-Reply-To: <hinc7AmgIHA.5204@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: strange security role issue
which
Thanks, your pointer led me to the CreateUserWizard1_CreatedUser hook,
will work fine.user
As for the authorization, here is the setting (from web.config in the
secured folder), for a section that should not be viewable by a new user
(but is) :
<?xml version="1.0" encoding="utf-8"?>
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="administrator" />
<deny roles="member" />
<deny roles="client" />
<deny users="?" />
</authorization>
</system.web>
</configuration>
When a new user is created, I have confirmed that they are not given any
role. So this authorization rule would not apply, correct? (since a new
is now not anonymous, and is not a member of any of the roles listed).not
Yet, if this is true, how can I create a rule for any known user that is
a member of any role?
The other aspect you mentioned was the sitemap config file, by which I
assume you mean the sitemap section of the web.config file, correct?
I use this setting:
<siteMap defaultProvider="DesktopSiteMap" enabled="true">
<providers>
<add name="DesktopSiteMap" type="System.Web.XmlSiteMapProvider"
siteMapFile="~/desktop/desktop.sitemap" securityTrimmingEnabled="true"/>
<add name="MobileSiteMap" type="System.Web.XmlSiteMapProvider"
siteMapFile="~/mobile/mobile.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
I found a reference to adding roles in the sitemap node
(ms-help://MS.VSCC.v90/MS.VSIPCC.v90/MS.MSSDK.1033/MS.NETFX30SDK.1033/dv_
earlierpnetcon/html/4028528f-e01c-4ae3-bd8d-bb161718fe61.htm)
where it shows how to allow access to everyone,roles="*">
<siteMapNode title="Home" description="Home" url="default.aspx"
one
By adding these access rules explicitly on a node, the article suggests
can improve performance. But this seems only to reproduce thefunctionality
that security trimming provides, and is not required, correct?group
Summary of question at this point is:
if my settings above are correct, do I need to create a special case for
known users that are not assigned to a role? How would I describe that
in the authorization section?sending
""Steven Cheng"" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:hinc7AmgIHA.5204@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Jrl,
As for the CreateUserWizard, I think you can consider using the
following
means to add the additional task:
The CreateUserWizard control has some events such as "CreatingUser" ,
"CreatedUser". The "CreatedUser" event fires after the user has been
successfully created. Therefore, you can consider doing the email
mayor other post-tasks there. Also, you can test to see whether the
"Username"
property of the CreateUserWizard is still available there, if not, you
need to store the username in "CreatingUser" event or some other
SiteMapNode,inplace
For the security trimming, based on my experience, such
navigation/access
rule mismatch problem is often cased by incorrect role authroization
setting. What's your current <authorization> setting ?
According to the security-trimming reference, there are two things that
will control whether a certain navigation item(node in treeview or item
visiblilitymenu) will display to the cerrtain user:
**the url/file authorization rule (can be set through <authorization>
setting)
** the "roles" attribute in sitemap config file
first, ASP.NET will use authorization setting to determine the
of a certain node. And if you have "roles" attribute set in
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifruntime will check it to see whether any extra users are allowed to see
the
certain node(url...).
#ASP.NET Site-Map Security Trimming
http://msdn2.microsoft.com/en-us/library/ms178428.aspx
You can check your application's setting according to the above info to
see
whether there is any rule setting that cause this problem.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
suggestions about how we
can improve the support we provide to you. Please feel free to let my
manager know what you think of
the level of service provided. You can send feedback directly to my
manager
at: msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
roleissuesications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
followwhere an initial response
from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
andup response may take
approximately 2 business days as the support
professional working with you may need further investigation to reach
the
most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump
analysis issues. Issues of this nature are best handled working with a
dedicated Microsoft Support
Engineer by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
X-Trace-PostClient-IP: 70.67.40.71
From: "jrl" <jrl@xxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.vsnet.general
Subject: strange security role issue
I have a (development) website, where I have used role based security,
a
sitemap with SecurityTrimingEnabled as True. In this situation, I have
sections of the site which are accessible or not, depending on the
roles.usera
user is in.
I use the create user wizard to allow an internet visitor to create a
task,account. The wizard works fine, but how can I put an extra little taskinto
the wizard's process? I'd like the wizard to send the administrator an(I
email, to alert that there is a new user, who needs to have the role
set.
can handle the email part, but I don't know where to call this extra
within the wizard's sequence) This is the first part of the question.a
The second part, is that I've noticed a strange behavior in the role
that
newly created user gets. When I view the new user roles in the Web Site
Administration tool, it says that the user does not belong to any
onlysiteThis is what I expect. However, when I log in as that new user (with no
roles) I find that I have access to the whole navigation tree. Since
securitytriming is enabled, I should only be able to see areas of the
that are visible to all. Instead, I can see areas that are normally
thevisible to the administrator role users. This is obviously very bad!
How can I ensure the role that new users get when the wizard creates
unsetuser? Is there a step needed to define their role, or why is their
role allowing them to see administrator content?
.
- References:
- strange security role issue
- From: jrl
- RE: strange security role issue
- From: "Steven Cheng"
- Re: strange security role issue
- From: jrl
- Re: strange security role issue
- From: "Steven Cheng"
- Re: strange security role issue
- From: jrl
- strange security role issue
- Prev by Date: Re: strange security role issue
- Next by Date: Re: Visual Studio 2008 compatibility
- Previous by thread: Re: strange security role issue
- Next by thread: Re: VS 2008 Pro Trial Download
- Index(es):
Relevant Pages
|