Using the Basic Auditing Policy

Learn how to enable basic auditing of message size, bindings, and contracts.

For information about using policies in the context of the Community Manager developer portal, see Business Policies.

Note: The difference between the Basic Auditing and Detailed Auditing policies is that the Detailed Auditing policy captures the payload, and the Basic Auditing policy does not.

Table of Contents

Introduction

The Basic Auditing Policy is an out-of-the-box policy that is part of the Policy Manager default installation. It is an instance of the Auditing Service Policy; it provides basic auditing of messages and records the message metrics in the Monitoring > Logs tab. The policy is located in the Policies folder of the root Organization.

Note:

The following message metrics are recorded, but the policy does not audit the messages themselves. If you need full message auditing, use the Detailed Auditing policy.

  • Message Size: Audits the size of messages in the exchange.
  • Binding: Audits binding information.
  • Contract: Audits the contract governing a message.

The following identities are audited:

  • Consumer: Audits consumer identity sent with a request message.
  • End User: Audits end-user identity sent with a request message.

Basic Auditing

Note: You can set up Basic Auditing for successful messages and Detailed Auditing for error conditions. See Detailed Auditing on failure, Basic Auditing on success.

Note: For explanations of the individual fields, see Configuring an Auditing Service Policy. The Basic Auditing Policy and Detailed Auditing Policy are both pre-configured out-of-the-box instances of the Auditing Service Policy that are part of the default installation.

Configuration

Let's take a quick walkthrough of the Basic Auditing Policy configuration process to get you started.

Step 1: Attach Policy

Go to the Policies folder in the Root Organization and attach the Basic Auditing Policy to a web service, operation, or binding that you would like to audit.

Step 2: Test Policy and View Monitoring Data

After you've attached the Basic Auditing Policy to a web service, operation, or binding, send a request to your service and go to the Services > Monitoring section to view the results for Logs, Real Time Charts, and Historical Charts.

Activating a policy

When you create and configure a policy, the policy is in Draft state. When the policy configuration is complete, activate the policy: click Activate Policy and then confirm. See Activate a Policy.

A policy in Draft state is not available for general use. Once you activate the policy, it is in Active state and is available for use.

Attaching a policy

To use the policy, go to the Policies folder in the respective organization and attach the policy to a web service, binding, or binding operation.

Basic Auditing Policy: use case for Policy Manager

This section provides a usage scenario for use of the Basic Auditing policy in Policy Manager. In this scenario, the policy is used to audit basic message metrics.

Audit Basic Message Metrics

Audit basic message metrics of each exchange in usage logs of the Monitoring tab.

  1. Create a physical service in the Policy Manager Management Console using Create Physical Service.
  2. Provide service details and finish the wizard.
  3. Using Virtualize Service, virtualize and host the physical service on Network Director (ND1), and assign a name (for example, Vs1).
  4. Attach the Basic Auditing Policy located in the Root Organization Policies folder to the Vs1 service in Service Details > Policy Attachments > Operational Policies.
  5. Send requests from the application/client to the in Service Details > Policy Attachments > Operational Policies. service.
  6. The details in the usage logs show the recorded information for each exchange.

    The fields that are recorded in each exchange are:

    1. Message Size
    2. Contract
    3. Binding
    4. Identities: Consumer/End-User