Home > Articles > Software Development & Management > Architecture and Design

Guards and Walls of Software Fortresses

Keep the bad guys away from your fortress while at the same time allowing access through the use of walls and guards. You will discover what each of these devices do and how you can create them for your own system.
This chapter is from the book

At first glance, guards and walls seem to have paradoxical functions. Walls are designed to block access to the fortress. Guards are designed to allow access to the fortress. These two functions, however, are actually complementary. The efficacy of the walls is what makes the guard's job necessary. After all, if outsiders could send requests into the fortress any which way they wanted, there wouldn't be much incentive to use approved and guarded drawbridges.

Although charged with allowing access to the fortress, the guard is very selective. The fortress architect is responsible for deciding just how selective the guard will be and which technologies can be used to implement this selectivity.

In this chapter I discuss some of the issues involved with designing and implementing walls and guards. I will focus on three main fortress types: presentation fortresses, Web service fortresses, and business application fortresses. These three fortress types represent a good cross section of available guard and wall design and implementation strategies.

For the purposes of this discussion, I will assume a simple configuration of two fortresses wanting to communicate over a drawbridge and a bad guy who is up to no good. Shown in Figure 7.1, this setup consists of the following characters:

  • Ed, the envoy in the donor fortress

  • Gwen, the guard in the receiving fortress

  • Bart, the bad guy

07fig01.gifFigure 7.1. Two-Fortress Configuration

There are eight security issues we generally worry about when planning our fortress walls and guards:

  1. Fortification

  2. Validation

  3. Auditing

  4. Authentication

  5. Privacy

  6. Integrity

  7. Nonrepudiation

  8. Authorization

I'll go through these one by one, discussing each problem more fully and offering some likely solutions.

7.1 Fortification

Fortification refers to the ability of the fortress walls to prevent entry into the fortress (except, of course, through the drawbridge). If the fortress is well fortified, then the only way Bart the bad guy is going to get into it is by somehow tricking Gwen the guard into letting him in. Figure 7.2 illustrates the concept of fortification.

07fig02.gifFigure 7.2. Fortress Fortification

In the case of an Internet fortress (Web service or presentation), Bart will attempt to break into the fortress using an unexpected entry point, such as FTP or remote login. Once Bart has penetrated the Internet fortress, he may be able to erase or modify binaries, reboot the system, copy sensitive files, or set up his own privileged accounts, depending on the authorization level he manages to gain.

The most common way of fortifying the Internet fortress walls is with firewalls. Firewalls are a common fortification technology for many fortresses, but especially those connected to the Internet. Firewalls can restrict all but a select group of users from remote access. This small, select group is part of the fortress community (remember, a fortress is a group of people as well as a group of systems). Bart, needless to say, is not part of this select group.

Bart might also try to break into the fortress through the data strongbox. Data strongboxes are usually implemented with databases. If Bart can gain direct access to the database, he has effectively circumvented Gwen and can access all of the critical fortress data.

The database should be configured so that only user IDs associated with the owning software fortress are allowed to read, write, or modify data. Those user IDs, as trusted members of the fortress, should be allowed to do pretty much whatever they want.

Although proper configuration of the database is an important part of the fortress fortification, that configuration is much less complex for the software fortress architecture than for most N-tier architectures. N-tier architectures often require sophisticated database security configurations, with specific users allowed to access specific tables in specific ways that change as implementations of the business logic change. For a software fortress, database configuration boils down to a simple rule: If you are a member of the fortress, you can do what you want; if not, you can't. The configuration is very simple, it is easy to set up, and it doesn't change as implementations inside the fortress change.

Although all fortresses can avail themselves of firewalls and database security, business application fortresses have another trick up their sleeves: a mechanism called role-based security.

As I will discuss in Chapter 11 (Business Application Fortresses), business application fortress infrastructures are based on a technology that I refer to as component-oriented middleware (COMWare). COMWare is a technology closely associated with components, which I have discussed in the context of synchronous drawbridges.

Component systems transmit requests from a caller (the client) to a callee (the component instance) as a remote method invocation. The client lives in one process (the client process) and the component instance lives in another process (the component process).

Don't confuse the idea of a caller and client with a drawbridge. When we're looking at components as used within a business application fortress, the caller and the callee are part of the same fortress (although probably not part of the same process). As part of the same fortress, they do not go through drawbridges to get to each other, even though the technology is similar to some of the drawbridge technology.

Both the caller and callee processes have a specific associated user ID. In role-based security, each of these user IDs is assigned one or more roles by a component administrator. Examples of roles could be company managers or bank tellers.

Once the component administrator has given each client user ID one or more roles, that same component administrator sets up component access rights. The administrator decides which roles can access which methods in which components. For example, it might be appropriate to give either tellers or managers access to the updateAccounts method but only managers access to the addNewAccount method.

Role-based security was originally designed to deal with two security issues: authorization and authentication (I will discuss these issues in more detail later in the chapter). When role-based security was first introduced, it received a flurry of interest. It seemed attractive because it was an administrative model (one that can be totally managed by an administrator) rather than a code-based model (one that requires a programmer). All things being equal, administrative models are always preferable over coding models because they are easier to maintain. Besides, nobody believes that coders care all that much about security anyway.

However, role-based security turned out not to live up to its promise. The reason is that relatively few problems can be dealt with through role-based authorization. Let me give an example of a common problem that is not amenable to a role-based solution.

Consider a bank wanting to let clients check their balances online. The bank wants to make sure the clients are authorized to access the requested balances. This is a two-part problem. First, the clients must be authenticated (we know who they really are). Second, the bank is going to let clients access only their own bank balances. Using role-based security, we can say that only users in the client role can access the checkBalance method, but there is no way to specify that they can do so only when requesting to check their own account balances.

The problem we run into here is that limiting a client to only a specific account means that authorization is based not only on a specific method, but also on specific parameters to that method (e.g., accountID). Even the parameters don't give the full story. To really verify the user's access right, we probably need to check information in the database to be sure this particular account ID is associated with this particular client. Such a task is way beyond the capabilities of role-based security.

Why, you might ask, am I spending so much time on role-based security if it is so limited? It turns out that fortress architectures may be the redemption of role-based security. Although role-based security is relatively useless in run-of-the-mill authorization problems, it can provide one important capability for software fortresses: fortification.

In the same way that we can fortify the fortress by locking foreign users, such as Bart the bad guy, out of the database, we can also fortify the fortress by locking foreign users out of the components. We do this by using role-based security. We define each process in the fortress as being a member of the role of, say, this-fortress. All components that are part of the fortress are then configured to allow access by members of the this-fortress role. If your user ID is associated with this-fortress, then you can ask any of your fortressmates to do whatever you want. If your user ID is not associated with this-fortress, then don't even bother asking for the time of day. And that includes you, Bart!

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020