Tags: security

Programmatically modifying file permissions in .NET

For one reason or another, somewhere down the line, you’re probably going to want to modify a file’s access permissions from your code. Maybe your users have a nasty habit of overwriting them, or you want to ensure that newly-created files are given a specific permission mask. Whatever the reason, the following C# code example shows how to modify a file’s access permissions using the System.Security.Principal and System.Security.AccessControl namespaces. Read More →

Redirect Tomcat to FQDN

Recently, I have been trying to configure several Tomcat servers (versions 5.0, 5.5, and 6.0) to restrict all traffic to SSL and ensure that all requests are served through the FQDN (fully-qualified domain name) of the server involved.

Well, the first half of that adventure was relatively easy to figure out (thanks to Google and some newsgroups). However, the second half of it all—the FQDN redirection—has been boggling my mind (and my search results) for a little while… that is, until now. Read More →

LDAP authentication with VB.NET

LDAP, or Lightweight Directory Access Protocol, is a convenient, central repository for a system’s personnel information. LDAP (and other Active Directory services) are widely-used by organizations big and small to consolidate user credentials and identification data. For instance: a reporting services application, a webmail client, and a database administration suite can all read from the same Directory, with no need for replicating user information. John Doe only has to remember one password for all systems. When he changes it, those changes cascade across the board. Read More →