C
cpnet
I've read through "Building Secure MS ASP.NET Applications", and "Improving
Web Application Security", but I'm a little confused about how to properly
set up security.
I am building a few controls/components that will be used by another party
in their own web app - and I have no involvement in the actual web app, only
these custom controls/components. One of my custom controls relies on the
Infragistics WebTree control.
Right now, my controls/components are split up into 3 assemblies, and
because of this, some methods/properties have to be public even though only
my own assemblies should be able to call these 'public' methods/proprties.
I also want to ensure in some cases that only my own assemblies can have
classes that inherit from other classes in my assemblies. I understand that
if I strongly name my assemblies, then I can use an attibute on the 'public'
members to ensure that only my own assemblies can call them. However, I
start to get confused, because it seems I start to get into issues of full
trust vs. partial trust, demands vs. link demands, asserts, and APTCA. I'm
not completely sure when I need to be concerned with each of these things.
Finally, I want to have an additional satellite assembly (that will be more
frequently updated, and backwards compatible with my other assemblies).
This satellite assembly will contain an Xml 'file' in a resource that only
my assemblies should have access to.
My controls will only function in an ASP.NET web-app, but some of my
components and classes may be used in a non-ASP.NET and/or ASP.NET
environment. What do I need to do to keep things secure, yet still
functional in a web-app?
As far as I can tell I have to:
- Mark my assemblies with APTCA
- Strongly name my assemblies and have them installed in the GAC (but what
happens if the consumer of my controls just put's them in the web-apps \bin
dir instead)?
- use full demands on public members I want to secure (but also user
asserts on my assembly code that calls these members to deal with stack-walk
issues)
- encrypt the Xml in my satellite resource assembly, and secure the method
that will provide a decrypted version of the resource
- use a publisher policy file(/assembly?) to enable me to update the
sattelite assembly containing the Xml resource without having to update my
other assemblies while using strong names for all assemblies
Have I got it right? Is there an easier way? At this point, I'm seriously
considering just packaging everything into a single assembly (.dll) to avoid
all the hassles.
Web Application Security", but I'm a little confused about how to properly
set up security.
I am building a few controls/components that will be used by another party
in their own web app - and I have no involvement in the actual web app, only
these custom controls/components. One of my custom controls relies on the
Infragistics WebTree control.
Right now, my controls/components are split up into 3 assemblies, and
because of this, some methods/properties have to be public even though only
my own assemblies should be able to call these 'public' methods/proprties.
I also want to ensure in some cases that only my own assemblies can have
classes that inherit from other classes in my assemblies. I understand that
if I strongly name my assemblies, then I can use an attibute on the 'public'
members to ensure that only my own assemblies can call them. However, I
start to get confused, because it seems I start to get into issues of full
trust vs. partial trust, demands vs. link demands, asserts, and APTCA. I'm
not completely sure when I need to be concerned with each of these things.
Finally, I want to have an additional satellite assembly (that will be more
frequently updated, and backwards compatible with my other assemblies).
This satellite assembly will contain an Xml 'file' in a resource that only
my assemblies should have access to.
My controls will only function in an ASP.NET web-app, but some of my
components and classes may be used in a non-ASP.NET and/or ASP.NET
environment. What do I need to do to keep things secure, yet still
functional in a web-app?
As far as I can tell I have to:
- Mark my assemblies with APTCA
- Strongly name my assemblies and have them installed in the GAC (but what
happens if the consumer of my controls just put's them in the web-apps \bin
dir instead)?
- use full demands on public members I want to secure (but also user
asserts on my assembly code that calls these members to deal with stack-walk
issues)
- encrypt the Xml in my satellite resource assembly, and secure the method
that will provide a decrypted version of the resource
- use a publisher policy file(/assembly?) to enable me to update the
sattelite assembly containing the Xml resource without having to update my
other assemblies while using strong names for all assemblies
Have I got it right? Is there an easier way? At this point, I'm seriously
considering just packaging everything into a single assembly (.dll) to avoid
all the hassles.