|
>
 Wednesday, January 12, 2005
 |
|
 |
|
|
|
|
|
Tonight was my turn to present as part of Regional Directors presentation month in southern california. Tim Huckaby presented at the San DIego .NET Developer's Group last week, I presented to the VBUG in Orange County (with a good collection of C# UG members also present), and Paul Sheriff is next, presenting to the San Diego .NET User Group the last week of January.
Tonight I test drove my latest materials on .NET 2.0 ClickOnce and related subject matters for Smart Clients such as offline connectivity and data storage, versioning and deployment, security evaluation and elevation, and so forth. The slide deck is in PPT format here:
versiondeploysmartclient20.zip (979.02 KB)
Related links I showed at the end of my talk:
http://www.idesign.net - See some of the .NET 2.0 webcasts delivered by my colleagues http://www.dotnetdashboard.net/sessions/versiondeploy.aspx - see my resources on .NET 1.1 versioning and deployment
Other Microsoft resources for smart clients: http://www.windowsforms.net http://msdn.microsoft.com/smartclient
|
|
|
 |
|
 |
 Saturday, January 08, 2005
 |
|
 |
|
|
|
|
|
I recently recieved this question from a SearchWebServices.com reader:
I am designing a sample app that has 3 tiers - Web browser, .NET application & DB server. I believe (correct me if I am wrong) that given that each individual user will not be connecting to SQL server directly (except maybe for DB Admin's etc) it is desirable to create a login for IIS to connect to the server and a user login to connect to the DB in question with the appropriate permissions. The .NET application will be connecting to the DB using ADO.NET. Is this true, or am I barking up the wrong tree?
Interestingly this is a subject I have been writing about recently. Here's the answer I posted for this question.
Let’s first clarify the physical tiers you describe here. The Web browser on the client tier, but really doesn’t participate in the description of tiers for the server-side application. Users will provide credentials through the browser that must ultimately be authenticated by IIS or passed through to ASP.NET for custom authentication. The .NET application I presume is hosted on the Web server physical tier, along with IIS. The database server physical tier hosting…well…the database application. potentially The server-side then has two physical tiers. If this is an intranet-based application, the Web site is likely configured for Windows authentication in IIS, which means IIS will authenticate the user within the Windows domain. Authorized requests will be forwarded to the ASP.NET runtime for processing, and if the application is configured to impersonate the authenticated user, application code will be governed by what the impersonated account is authorized to do:
<identity impersonate=”true” />
For example, if the logged in user is authorized to access the database (which really means, whichever database objects the account is granted access to, and for whatever type of access like db_datareader, dbdatawriter) then functionality to access the database will execute without exception. But this is not realistic as you mention. That means the code that tries to access the database must first impersonate an account that is granted appropriate access to the database objects. If the intranet application impersonates the logged in user, then this impersonation must be handled on the fly, and must be reverted so that the logged in user is once again the identity under which the remainder of the request thread executes.
If the application does not impersonate the logged in user, ASP.NET application requests will be executed with the ASP.NET identity configured in the <processModel> section of the machine.config. This is usually the NETWORKSERVICE account, which has limited privileges (by design). In theory you could have the application impersonate a higher privilege account for all requests that also has access to the appropriate database objects. BUT - DO NOT DO THIS. This is the lazy man’s solution to gaining access to protected resources, and it seriously compromises the safety of the application. If a hacker were to gain access to an executing thread inside the worker process, they will have access whatever privileges have been granted that thread. By default, we prefer this to be the NETWORKSERVICE account, or the account of the logged in user for intranet applications.
So, the solution?
- Either impersonate the logged in user or run the application under the NETWORKSERVICE account
- For calls to the database, either impersonate a privileged account at runtime, or use EnterpriseServices to invoke a serviced component that runs with the required account with database privileges (better). This decouples the configuration of the required account to access the database from the code, allowing it to be modified as needed through serviced component configuration (COM+). This also has the benefit that later you could distribute the database access component to another tier for scalability and security requirements.
What accounts do you need?
- It is useful to have an account that can only read the database (db_datareader privileges to appropriate objects), and another that can read and write (db_datareader and db_datawriter privileges). This way, during read operations you are not vulnerable to write attacks.
For more information on this subject, see my article on The Server Side.NET referenced here in my blog: http://www.dasblonde.net/PermaLink.aspx?guid=aa616d20-1089-4a24-8f0c-14326f2a731c
|
|
|
 |
|
 |
 Thursday, January 06, 2005
 |
|
 |
|
|
|
|
|
Yet another article published in December 2004, the architecture-focused continuation of the 15 Seconds article mentioned in my last blog entry. This one talks about architecture for ASP.NET applications to run with least privilege, design and allocate components, and handle runtime security elevation as needed while starving the application runtime of privileges to prevent hackers from getting in. Part 1 focuses on a solution without allocating other processes with Enterprise Services.
http://theserverside.net/articles/showarticle.tss?id=SandboxingComponents
Part 2 is being written as I write this...well, not exactly...but after I write this I'll get back to it...
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
I learned something new last night: shrinkster.com
I guess I had heard my geek friends discussing urls with this domain before, but didn't really probe into it (that must have been my other 55% non-geek-personality taking over). So it's really cool, when you have to rattle off urls verbally (say on a radio show taping) or want to deliver a presentation and give attendees a single short url to go for everything. So it generates a shrinkster.com/bla address for you (where bla is some short value like 31g).
What I want to know is, since shrinkster.com has virtually no company information on the site and no advertising...not to mention no freaking indication that they will be in business (if there is a business) for any length of time...then how can I possibly create shrinkster urls that I can guarantee for some lifetime?
I think I'll only use it for transient purposes...related to phone conversations and live events...to ease in verbal delivery...
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
VSTO (or, Visual Studio Tools for Office) 2005 is pretty darned cool. Yeah, I know about it...yeah, I've thought about it...and yeah, I know some day I'll spend some time using it...but not yet.
So, I stayed for Tim's presentation at the San DIego .NET Developer's group this past Tuesday, and realized that I can actually build better spreadsheets now, as a developer, using VSTO, than I ever stood a chance of doing just by using Excel directly. I suck at Excel macros, I never cared for VBA, but I love VSTO. The sheer idea of my own developer environment that I know and love letting me write some “code-behind” for my Excel spreadsheets and Word documents, letting me drag and dop buttons to create forms in a natural design environment, and letting me debug this like I would any other application...wow.
I know, it is nothing new, but I feel like I really “saw” it for the first time this week. Was it Tim's good looks, his killer presentation, or was I just ready to accept the promise of VSTO? We may never know the answer, but it doesn't matter, I'm going to build killer spreadsheets....er....as soon as I get a few minutes free...
Want to know more? Clearly I have no sample code to share (yet) but you can go here to get started:
http://msdn.microsoft.com/office/understanding/vsto/
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
On Tuesday night this week I volunteered to do the 101 talk for the .NET Developer's group, before the famous and infamous Tim Huckaby did his killer, wicked Visual Studio Tools for Office (VSTO) presentation.
For my talk, I took a much deeper, advanced talk I do, which articulates 10 steps to versioning and deployment success, and I basically c-o-v-e-r-e-d t-h-e f-i-r-s-t b-u-l-l-e-t w-e-r-y w-e-r-y s-l-o-o-o-w-l-y to turn it into 1 hour of deep discussion on the subject of strong names, their value from a security and versioining perspective, some of the pains of using them, and some demonstrations to go along. The complete list of materials for this subject can be found on my versioning and deployment resource site:
http://www.dotnetdashboard.net/sessions/versiondeploy.aspx
The next time I do a 101 talk for this group, if Dave and Woody invite me back ;), I'll move to bullets 2 and three of the 10 step presentation...and so on, and so on, and so on...
What are the 10 steps I discuss in the advanced talk?
- 1.Use strongly named assemblies
- 2.Think before you GAC
- 3.Covet all private keys
- 4.Get to know Code Access Security
- 5.Evaluate runtime security requirements
- 6.Run with least privilege
- 7.Protect your intellectual property
- 8.Master assembly versioning
- 9.Design a deploy/upgrade strategy
- 10.Prepare for future of .NET
Enjoy :)
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
No blogging = pretty freaking busy != nothing to talk about
In fact, I've been so over my head in WS* interop, ASP.NET security and scalabiltiy architecture work and writing, that I have been a really really bad blogger...and now I don't know where to begin posting...
How about this for starters, it is now official, I am 45% geek...
I took the test after I found out Don Keily and Rocky Lotka did...unfortunately I can't meet their geek levels, I knew I should have installed Firefox. Damn!
But you know there are different types of geeks...and compared to most of my friends and family...I'm pretty darned geeky. I mean, how many non-geeks do you know who...
Insist on playing giant chess even though they are going to lose against the master they are playing (see the stress on my face?)...ok, the glass of wine helped:

And how many non-geeks do you know that would wear a “We are #” t-shirt from Newtelligence?

And how many non-geeks do you know that would hang out with other super geeks like Juval Lowy, Kimberly Tripp, and Clemens Vasters? C'mon, these guys (and gals) are geeky...just like me!

And seriously, only a geek would do their hair like this for a new years eve party....er...right?

So, have I proven that I'm a geek yet? Did I convince you that I deserve a higher score than 45% on the geek quiz? Take the quiz yourself (above click the link) and see where you rank...
In the meantime, back to serious content...although this post probably makes it look like I have time on my hands...er...I don't...back to work.
Caio!
|
|
|
 |
|
 |
 Tuesday, December 07, 2004
 Wednesday, November 24, 2004
 |
|
 |
|
|
|
|
|
Glad to see everyone last night at this presentation, it was quite enjoyable, great questions from the audience as well which always makes my day! Here's the link to the site with access to my slide deck and other resources:
http://www.dotnetdashboard.net/resources/scalability.aspx
You can get the Enterprise Services sample from there, and a reference to my article which provide more detail. In addition, I demonstrated some asynchronous handler examples, but I found a great article from Fritz Onion on the subject, so here's the link to his article with access to his samples for the article, that will be even more detailed from that I demonstrated:
http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx
If you are new to handlers, check out my handlers page, with reference to some other articles I've written as well:
http://www.dotnetdashboard.net/sessions/handlers.aspx
Enjoy!
|
|
|
 |
|
 |
 Saturday, November 13, 2004
 |
|
 |
|
|
|
|
|
If you were up at 8am for this session at VS Connections, I hope you had a coffee first because we covered a lot of ground! My resources for this talk are on this site:
http://www.dotnetdashboard.net/resources/wse.aspx
Some of my new code samples I showed you in the talk have been written with WSE SP2 (pre-release version), so I'll post those shortly once the service pack is public. Should be very very soon.
Also, you'll notice my DIME example on this site is pre SP1, I am working on an article to discuss the specifications around attachments, and will compare DIME with SwA for interoperability between platforms. Stay tuned for an update there. (this was not part of the security session, of course)
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
Thanks to everyone who attended my talk at VS Connections this week in Vegas, despite the temptation to hit the Casino instead! You may have noticed my site was actually down all week, I had to move it to a new location, and I thank you for your patience.
Here's the link to my Versioning and Deployment Resource page which you may have already visited (that site wasn't down). I have updated the site with new content, however, so check it own again and let me know if you have any questions.
http://www.dasblonde.net/PermaLink.aspx?guid=17d12fa3-59c9-4c49-9cc6-9b62f959df19
Also, don't forget to check out the slides for my talk, there are many links in there to other resources.
Nostrovia!
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
I recently wrote up an article that discusses best practices for versioning and deployment of .NET components. In the article, and in my sessions on this subject I emphasize code access security, running with least privilege, versioning issues, publisher policies and more. Check it out here: http://www.15seconds.com/Issue/041103.htm
On a related resource page, you can find the tutorial I wrote for the code sample: http://www.dotnetdashboard.net/sessions/versiondeploy.aspx
This month, you can expect an article explaining .NET runtime security and sandboxing.
Cheers!
|
|
|
 |
|
 |
 Wednesday, November 03, 2004
 |
|
 |
|
|
|
|
|
Hey everyone, I recently updated my localization resources page with the latest links to my articles, webcasts and code. Let me know if you want to see more!
http://www.dotnetdashboard.net/sessions/globalization.aspx
Look to this page first for updates to any of my article code, for example. I periodically updated my way of thinking about a problem, so this page will always have my latest best practices.
|
|
|
 |
|
 |
 Thursday, October 28, 2004
 |
|
 |
|
|
|
|
|
Here is a visual perspective to take you from OOP to service-oriented design. We're solving the same problems as time passes, just on a much wider scale: encapsulation, reuse, location transparency, loose coupling, etc.
|
|
|
 |
|
 |
|
|
ON THIS PAGE
|
|
|
|
SEARCH
|
|
|
|
CATEGORIES
|
|
|
|
ARCHIVES
|
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat | | 26 | 27 | 28 | 29 | 30 | 31 | 1 | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 9 | 10 | 11 | 12 | 13 | 14 | 15 | | 16 | 17 | 18 | 19 | 20 | 21 | 22 | | 23 | 24 | 25 | 26 | 27 | 28 | 29 | | 30 | 31 | 1 | 2 | 3 | 4 | 5 |
|
|
BLOGROLL
|
|
|
|
|
 |
|