官术网_书友最值得收藏!

Enabling security

After coming back from the hardware store with the parts (locks, keys, and so on) and tools (drill, screwdriver, and so on) and perhaps some advice from the hardware store assistant, you can confidently start the task of installing that lock system you just bought for your front door. In a similar way, now you can begin to configure your WebSphere global security.

As in many IT tasks, there may be more than one way to accomplish such a task. This section will guide you thru enabling global security using the Integrated Solutions Console. Throughout this chapter, we will also refer to the Integrated Solutions Console by the names of the WebSphere Console and the Deployment Manager Console.

Note

If your organization has a large base of WebSphere Application Server domains and you are considering enabling global security on multiple consoles, it may be a good idea to automate this task using the WebSphere administrative scripting interface, wsadmin.

The procedure we are going to follow in this section is carried out in three phases or stages as indicated below.

  1. . Set the domain name.
  2. . Configure the user registry.
  3. . Enable the administrative security.

As already mentioned in the planning section at the beginning of this chapter, the procedure described in this section will be using an LDAP-based registry. This type of registry will be applicable to most organizations. However, you are encouraged to experiment with another type of registry. In a laboratory setting, for instance, you could use the local OS authentication mechanism. Working with a different type of registry will help you better understand global security.

Setting the domain name

Our first task then, is to set the SSO domain name for the global security task. The sections that follow will walk you through the process.

Starting at the console

Log in to the WebSphere Console. Before global security is enabled, the Console will only have one field in which to enter an ID. This ID can actually be anything since we have not linked our WebSphere environment to any user registry. (The use of the term User ID may be misleading. At this stage, WebSphere uses that field as a temporary tag to label an area in which to save any changes that may be made during the session until they are either committed or discarded.) Access the Deployment Manager Console using a browser, enter a value for User ID and click the Log in button. Prior to enabling global security, part of the Console log in page will look similar to the portion shown in the following screenshot.

Starting at the console

Continuing with the global security page

We first need to open the Global security page. After logging in, expand the Security leaf on the left pane of the console, and then click on the Global security link as shown in the following figure. The global security page will be displayed on the right hand pane.

Continuing with the global security page

Onto the SSO page

Next, let's open the SSO page. Expand the Web and SIP security leaf under the Authentication section on the right section of the Global security page (figure shown previously). Click on the Single sign-on (SSO) link. A portion of the SSO page is shown in the next screenshot.

Onto the SSO page

Setting the SSO domain name

Under the General Properties section, enter the SSO domain name in the corresponding field, as shown in the previous screenshot. Use the default selections for the rest of the parameters.

Note

If you check the Require SSL parameter, single sign-on will only be in effect for SSL communications. If your HTTP server resides in the same server as your WebSphere Application Server, you will normally not want to use SSL for communications between the WebSphere Plug-in running inside the HTTP server process, and the WebSphere Application Server hosting an application.

Applying and saving your changes

Keeping as a reference the previous screenshot under the section Onto the SSO page, saving the changes is in order. Click the OK button. You will be sent back to the Global security page. A Messages box is displayed at the top of the page giving you the opportunity to save your changes. The message is shown in the following screenshot:

Applying and saving your changes

Save your work as you normally would have for any other configuration modifications of your environment in the past, ensuring that the changes are propagated to all your existing nodes in this cell.

Tip

Learning WebSphere configuration internals

If you wish to learn which internal WebSphere parameters are modified, created or deleted as you apply various configuration tasks you may want to do the following. For this particular task, before you commit the changes, make a copy of the file:<Dmgr_Profile_Path>/config/cells/<cell_name>/security.xml. As you save your work, you can compare the difference between the original copy and the active version of the file to observe what has changed.

It is important to ensure that any of the changes made while enabling global security are synchronized with all of the nodes in the cell as they are saved by the deployment manager. Failing to do this may prevent the nodes from getting the new configuration and they may be unable to communicate with the deployment manager.

Configuring the user registry

Once the SSO domain name has been set, we are now ready for the second phase in the securing of the WebSphere Console, and we can proceed to select the user registry. During this stage of the global security configuration, we are going to tell WebSphere which type of registry to use, what server and port to connect to and which user IDs and passwords to use. Once global security is enabled, WebSphere uses the information from this repository to grant or deny access to resources as they are requested (in accordance with settings in the enterprise applications and in their installed configuration.

Locating the user registry configuration area

Open the WebSphere Console Global security page. If you have closed your browser, you need to open the Deployment Manager Console and log in as you did in the first stage. (If needed, refer to the section "Starting at the Console"). Next, expand the Security leaf and click on the Global security link, as you did in the second step of the first phase. During this stage, we will pay attention to the User account repository section (shown in the following figure).

Locating the user registry configuration area

Registry type selection

We continue by selecting the user registry type. The first thing we need to tell WebSphere is the type of user registry to which we wish WebSphere to connect. The default type is the local OS authentication mechanism. The supported registry types are shown in the following screenshot:

Registry type selection

In the next sections, we look very briefly at each of the options supported by WAS ND7.

Federated repository

The type Federated repository enables us to use a common interface to a collection of heterogeneous repositories. In addition, it establishes a common realm that WebSphere uses to query the user registry when needed. In other words, a federated repository provides a logical realm and a mapping between the logical entity types and the underlying repository entity types. There are four types of data stores that can be used in a federated repository: file-based, LDAP, database, and custom registry. In WebSphere, a federated repository is implemented using the Virtual Member Manager. Moreover, there is a restriction to whether or not two data stores can be logically combined, that each data store contains unique distinguished names from the others.

Local operating system

Next is the type Local operating system. As the name implies, it uses the host OS user and group schema as the repository for users. There are several limitations to using this type of repository. On the one hand, for distributed systems such as Unix, Linux and Windows OS, the authentication mechanism must use a domain controller when the cell expands to more than one host. On the other hand, the built-in authentication mechanism of the OS can be used as registry only if all of the cell components are hosted in the same OS server. Furthermore, if the process owner for the WebSphere environment is a non-root ID, the local OS cannot be used if the cell components are spread over multiple OS hosts.

LDAP

We continue with the type Standalone LDAP registry. The formal definition for Lightweight Directory Access Protocol is: "provides access to distributed directory services that act in accordance with X.500 data and service models" [RCF 4511: Lightweight Directory Access Protocol (LDAP): The Protocol].

Standalone custom registry

Finally, the last type of supported registry is the Standalone custom registry. As the name implies, this type of registry provides a custom access interface (or more officially, custom adaptors) to a custom store. An example of a custom adaptor (although written for WebSphere v6) can be found at: http://www.ibm.com/developerworks/websphere/library/samples/vmmsampleadapter.html.

LDAP—the preferred choice

In most scenarios, it is likely that you will be using a type of standalone LDAP server. Select the Standalone LDAP registry option from the Available realm definitions pull-down menu. Once the standalone LDAP registry type is selected, click the Set as current button. The value of the Current realm definition field updates to the selected value as shown in the following screenshot:

LDAP—the preferred choice

Reviewing the resulting standalone LDAP registry page

Simultaneously, as a result of the previous action, a warning message is displayed at the top of the Standalone LDAP registry page, as shown in the next screenshot. The deployment manager is just reminding us that the configuration we are about to make will not become active until we turn on global security.

Reviewing the resulting standalone LDAP registry page

Defining the WebSphere administrative ID

Under the General Properties section, enter the value for the WebSphere administrative ID in the Primary administrative user name field. For the purposes of this chapter, we are using the fictitious value wasadm, as shown in the following screenshot. For additional information on this value refer to the LDAP and security table section.

Defining the WebSphere administrative ID

Setting the type of LDAP server

Next, we need to select the type of LDAP server. The default type is the IBM Tivoli Directory Server. The supported LDAP server types are shown in the next screenshot. Obviously, your choice will depend on the type of LDAP server used by your company.

Setting the type of LDAP server

Entering the LDAP server parameters

Using the values you gathered in the first section of this chapter, Information needed: planning for security, enter the LDAP server host name value in the Host field. The fictitious value jsdsdev01.yourcompany.com is being used in our example. Next, enter the LDAP server TCP port value in the Port field. We are using the standard TCP port 389. The following screenshot shows how these values are displayed in the Standalone LDAP registry page.

Entering the LDAP server parametersLDAP server parameters

Providing the LDAP bind identity parameters

Once the primary parameters that identify the LDAP server have been specified, we need to designate the parameters to be used by WebSphere to connect to the LDAP registry. In the field designated as Base distinguished name (DN), enter the value for LDAP Base Distinguished Name identified in the Information needed: planning for security section. We will be using the value o=yourcompany.com. Next, enter the Bind Identity value in the Bind distinguished name (DN) field. The full value shown in the following screenshot is uid=wasbind,ou=service,o=yourcompany.com. Finally, enter the corresponding password for the bind ID in the field that is designated as Bind password. These values are shown as displayed in the Standalone LDAP registry page in the following screenshot:

Providing the LDAP bind identity parameters

Confirming other miscellaneous LDAP server parameters

In general, the default value of the remaining parameters for the LDAP server works just fine in most situations. Normally, there will be no need to modify the default values shown in the following screenshot. However, if for instance, the LDAP server to be used with this particular WebSphere environment only accepts SSL connections, that fact would have to be reflected by checking the SSL enabled check box under the SSL settings section of the Standalone LDAP registry page. In a similar way, if your particular LDAP server has other requirements that are not covered by the default selections shown in the following figure, adjust the corresponding parameter accordingly.

Confirming other miscellaneous LDAP server parameters

Applying and saving the standalone LDAP configuration

At this point, all that is left to complete the configuration of the standalone LDAP registry is to commit the new configuration values just entered. Click the Apply button, located at the bottom of the page. In the resulting page, a Messages section appears at the top of the page. Use the appropriate link to save your work, always insuring that the changes are synchronized with any existing node agent.

Confirming the configuration

Before concluding this portion of the configuration, it is best practice to confirm that the deployment manager can connect and log in the LDAP server. Identify and click on the Test connection button located near the top of the page, just above the General Properties section. If your configuration is correct, a Messages section is displayed at the top of the page, similar to the one shown in the next screenshot. If an error occurred, a corresponding message will be displayed. Correct the error and test the connection again.

Confirming the configuration

Note

Common errors that may take place while testing the LDAP connection include mistyped hostnames, IDs and passwords. Another type of error, a little more difficult to detect, could be that WebSphere cannot connect to the LDAP server. This could be due to a possible firewall issue (by either a real firewall appliance or a firewall application running on the LDAP server host OS), or a temporary network slowdown.

Enabling the administrative security

Once the two first stages have been completed, we are now ready to start the last phase in the securing of the WebSphere Console and can proceed to turn on the administrative security.

Tip

Best practice: node activation

Ensure that all of the node agents in your cell are operational. If they are not, the node agents will not be able to receive the changes to the global security and additional steps will be required to allow them to connect to the deployment manager.

By enabling administrative security, we are effectively turning on global security. In order to enable the administrative security perform the following steps.

Locating the administrative security section

Open the WebSphere Console Global security page. If you have closed your browser, you need to open the Deployment Manager Console and log in as you did in the previous two stages. (If needed, refer to the first step of the first stage.) Next, expand the Security leaf and click on the Global security link, as you did in the second step of the first stage. This time we are going to focus on the Administrative security section, as shown in the following screenshot:

Locating the administrative security section

Performing the administrative security configuration steps

Under the Administrative security section, check the Enable administrative security box. You will notice that the box labeled Use Java 2 security to restrict application access to local resources is checked automatically. Normally, you do not want this box to be checked, so remove the check from Java 2 security. The main reason for choice is that it is not uncommon for enterprise applications to require Java 2 security access that surpasses the default security policies. When this fact is present, enterprise applications are likely to either fail or function differently as designed. Therefore, modifications to the application's app.policy or was.policy, as appropriate, would be required. Additional information about these files can be found at http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/rsec_rpolicydir.html. An alternative to employing Java 2 security is to use an external access control policy manager, for example, IBM Tivoli Access Manager or the popular CA SiteMinder Policy Server. Moreover, Chapter 3 describes alternative locations in the administrative console where the Java 2 security can be enabled for a limited number of applications that require it.

Your selections should be as those shown in the following screenshot:

Performing the administrative security configuration steps

Applying and saving your changes

On the same Global security page, scroll down. Click the Apply button, located at the bottom. It is likely that WebSphere may display a long Messages section as the one shown in the next screenshot:

Applying and saving your changes

Summarizing these warning messages, they tell us what to do if one or more node agents belonging to this cell are not active in order to propagate our configuration changes to each node agent configuration repository.

Propagating new configuration

After reading the warning messages, click on the Save link to commit your changes to the WebSphere configuration repository. However, if you have not enabled automatic synchronization with the nodes after each save, then click on the Review link instead so you have the chance to indicate that you wish these changes to be propagated to the nodes in the cell.

Logging off from the console

Once you have saved your changes, you need to allow WebSphere to make those changes active. This is accomplished by restarting the deployment manager. Although not necessary, it is always good practice to log off the console. If there were pending tasks to be saved, the deployment manager would display a message to either save or discard any pending changes before allowing you to log off.

Tip

Changes in the deployment manager console URL

Pay close attention to the URL used to access the WebSphere Console until this point. The protocol used is HTTP. Make note of the port being used. This port matches your WC_adminhost TCP transport. After you activate the global security, this URL will change. First, the protocol changes to HTTPS. Secondly, the port also changes. This time your browser will be redirected to the WC_adminhost_secure TCP transport. You can still use the old URL; the deployment manager console will redirect your browser to the secure port.

When describing procedures that need to take place at the OS level, in this book it will be assumed that we are working on a Unix or Unix-like environment. If you are working on a different type of OS, it is likely that you are already familiar with the various commands used and can perform the equivalent operations in your particular OS.

Restarting the deployment manager

Log in to the command line interface of your OS on the server where the deployment manager process is executing. Switch to the user ID used to stop and start the deployment manager process as you normally do. Use the following command:

 <Dmgr_Profile_Path>/bin/stopManager.sh

(Use stopManager.bat in Windows; or the Windows service for WAS). Now you can start the deployment manager. Use the following command:

 <Dmgr_Profile_Path>/bin/startManager.sh

(In Windows, use startManager.bat or the Windows services interface). Ensure that the output does not display any errors.

Note

Keep in mind that global security will take place only after the deployment manager and all of the nodes in its cell are restarted.

Logging in to the deployment manager console

Using your browser, connect to the WebSphere Console using the same URL you have used before. WebSphere will attempt to redirect you to its secure administrative port. However, your browser will show you a warning message stating the SSL certificate presented by the site is invalid. The deployment manager is presenting its self-signed certificate and the warning message means that your browser does not have a root CA certificate to validate it. This is fine, since it was the configuration we just did that created the SSL certificate. Click on the OK button. Depending on the browser being used you will be presented with the option to cancel or continue. Firefox presents an Or you can add an exception link. IE presents a Continue to this website (not recommended) link. Accept the SSL certificate.

The Integrated Solutions Console opens. One can tell that global security is on by observing that the log in page now has two fields. One field is for the User ID and the other is for the Password. Enter the appropriate credentials (WebSphere administrative ID and password) and click on the Log in button.

Congratulations! You have successfully enabled global security.

Note

When global security is enabled you will be asked to provide a user ID and its corresponding password in order to issue commands that are required to communicate with the WebSphere administrative infrastructure (for example, node agents.) The parameters to supply to most command line scripts are -username and -password. For instance, to see the status of the deployment manager process, you would enter:<Dmgr_Profile_Path>/bin/serverStatus.sh -username wasadm -password <mysecretpwd>

主站蜘蛛池模板: 淮南市| 榆中县| 承德县| 凯里市| 吴川市| 黑龙江省| 安乡县| 垣曲县| 濮阳市| 东丽区| 孟津县| 开鲁县| 湘阴县| 静海县| 星子县| 抚顺县| 上饶县| 定结县| 伊通| 无为县| 西林县| 武山县| 玉屏| 新民市| 沾化县| 永川市| 临桂县| 铜梁县| 鹰潭市| 昌黎县| 望都县| 临朐县| 图们市| 元江| 台湾省| 宜兴市| 济源市| 马山县| 响水县| 杂多县| 道孚县|