Book Image

Mastering Microsoft Forefront UAG 2010 Customization

Book Image

Mastering Microsoft Forefront UAG 2010 Customization

Overview of this book

While UAG is built to integrate with many environments and publish dozens of application types, many organizations require a certain level of customization to meet their needs. With this book in hand, you will be equipped to deal with these types of customization scenarios, and you will be confident in using such workarounds without hassle and trial and error. Written by some of the leading experts on UAG, "Mastering Microsoft Forefront UAG 2010 Customization" covers the most complex and challenging options for customizing UAG in a way that is friendly and easy to follow. It walks you through various customization tasks, including explanations and code samples, as well as creative ideas for troubleshooting your work. Until now, only a few of the extensions to UAG's services have been publicly available, and most were only known to a select few. Now, this can include you! Throughout this book, you will tackle how to change the system's look-and-feel, deal with advanced authentication schemes and write special functions that need to be executed as part of the client interaction. With "Mastering Microsoft Forefront UAG 2010 Customization", you too can learn how to customize various aspects of UAG's functionality to enhance your organization or customers' experience.
Table of Contents (16 chapters)
Mastering Microsoft Forefront UAG 2010 Customization
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

The CustomUpdate mechanism


The UAG customization framework is based on a well-known concept often referred to as CustomUpdate. The idea is that some folders within the UAG folder tree contain special folders with this name, and in them you can place your own custom code. When the UAG's code runs, it automatically checks these folders for custom files, and processes them accordingly. For example, here's such a function from the page logo.inc:

As you can see, the command uses the function include Application and defines a filename pattern for when UAG performs its CustomUpdate file check. If the file is found, the function will read its content and process it as if it was a part of the original code (the include function itself is in /InternalSite/Inc/include.inc). The actual filename (logo.inc) is populated into LOGO_INC as part of the file /InternalSite/Inc/IncludeFiles.inc. The following screenshots show these two files:

It's important to keep in mind though, that this processing is sometimes a cumulative processing, and sometimes replaceable processing. Depending on the design of the specific component, UAG might use your file instead of the original file (for example, if you customize the Login page), or in addition to the original file (such as when customizing the endpoint detection script).

The process of customizing a file is simple: you create your file, drop it in the relevant folder, and name it appropriately. The file naming convention used by UAG is:

<trunk Name><Secure><name>.<extension>

The trunk name is obvious. The Secure flag is either 0 or 1, depending if the trunk is HTTP or HTTPS. The name is the original filename, and the extension needs to match.

For example, let's say you want to create a certificate-authentication configuration. We will discuss this more in Chapter 6, Custom Certificate Authentication, but this is also considered to be a customization, as this will almost always require some editing of the ASP code itself to match the organization's certificate scheme. The name of the certificate authentication file is cert.inc, so if your trunk is named Remote, and the trunk is an HTTPS trunk, the file you will need to put in the target folder needs to be named remote1cert.inc.

Note

Letter case is not important in this naming convention.

For the most part, that's about it, and the next user who logs in will reap the benefit of the new custom file (or the error it may generate, if you messed it up!). Adding new files does not impact existing sessions, so if you are testing this yourself, you would need to log out and log in again, and we also recommend clearing your browser cache and cookies as well. Some files will require you to perform a configuration activation to take effect, and some take effect immediately. However, it is important to perform an activation regardless, otherwise, the custom file will not be pushed into the TMG storage and may later miraculously disappear from your server.

Another point worth mentioning is that when customizations are done to a UAG array, they should only be applied to the Array Master Server (AMS). During activation, the custom files will propagate across all array members.