OCC Policies and Permissions

Create IAM policies to control who has access to OCC metric data, and to control the type of access for each group of users. Currently, OCC doesn't have any resources.

As OCC has only metric data, there is no way to restrict access based on resource IDs. You can use the family name control-center-family and the resource type control-center-metrics to restrict access to the metric data overall. See Policy Examples section for details.

The users in the Administrators group have access to all the OCC resources and metric data. Create policies for users to have necessary rights to the OCC metric data.

If you’re new to IAM policies, see Getting Started with Policies.

For a complete list of Oracle Cloud Infrastructure policies, see policy reference.

This section explains the following topics:

To use OCC, create a policy that grants the following permissions to the user or groups that interact with the service accordingly.

OCC supports the following entities:
Resource Type Action Assigned to User Permissions
control-center-family Includes all the Control Center metrics and any future member resources in one family.
control-center-metrics Read OCC metric namespaces, metric names, and metric values.

CONTROL_CENTER_METRICS_INSPECT

CONTROL_CENTER_METRICS_READ

Supported Variables

You can use variables to add conditions to a policy.

OCI Control Center supports the following variables:

  • Entity: Oracle Cloud Identifier (OCID)
  • String: Free-form text.
  • List: List of Entity or String.

See General Variables for All Requests.

Variables are lowercase and hyphen-separated. For example, target.tag-namespace.name, target.display-name. Here name must be unique, and display-name is the description.

Required variables are supplied by the OCI Control Center service for every request. Automatic variables are supplied by the authorization engine (either service-local with the SDK for a thick client, or on the Identity data plane for a thin client).

Required Variables Type Description
target.compartment.id Entity (OCID) The OCID of the primary resource for the request.
request.operation String The operation ID (for example, GetUser) for the request.
target.resource.kind String The resource kind name of the primary resource for the request.
Automatic Variables Type Description
request.user.id Entity (OCID) The OCID of the requesting user.
request.groups.id List of entities (OCIDs) The OCIDs of the groups the requesting user is in.
target.compartment.name String The name of the compartment specified in target.compartment.id.
target.tenant.id Entity (OCID) The OCID of the target tenant ID.
Dynamic Variables Type Description
request.principal.group.tag.<tagNS>.<tagKey> String The value of each tag on a group of which the principal is a member.
request.principal.compartment.tag.<tagNS>.<tagKey> String The value of each tag on the compartment that contains the principal.
target.resource.tag.<tagNS>.<tagKey> String The value of each tag on the target resource. (Computed based on tagSlug supplied by service on each request.)
target.resource.compartment.tag.<tagNS>.<tagKey> String The value of each tag on the compartment that contains the target resource. (Computed based on tagSlug supplied by service on each request.)

Here's a list of available sources for the variables:

  • Request: Comes from the request input.
  • Derived: Comes from the request.
  • Stored: Comes from the service, retained input.
  • Computed: Computed from service data.

Details for Verb + Resource Type Combinations

Identify the permissions and API operations covered by each verb for Control Center resources.

The level of access is cumulative as you go from inspect to read to use to manage. A plus sign (+) in a table cell indicates incremental access when compared to the preceding cell, no extra indicates no incremental access.

For information about granting access, see Permissions.

control-center-metrics

This table lists the permissions and API operations covered by each verb, for the control-center-metrics resource.

Verbs Permissions APIs Covered Description
inspect

CONTROL_CENTER_METRICS_INSPECT

  • ListNamespaces
  • ListMetricProperties
Metrics are grouped into namespaces.

List all the namespaces.

Get the list of metrics in a specific namespace.

read

inspect+

CONTROL_CENTER_METRICS_READ

inspect+

RequestSummarizedMetricData

Get data (values) for a metric in a specific namespace.
use

read+

no extra

manage

use+

no extra

Permissions Required for Each API Operation

The following table lists the API operations in a logical order.

For more information, see Permissions.
API Operation Permissions Required to Use the Operation
ListNamespaces CONTROL_CENTER_METRICS_INSPECT
ListMetricProperties CONTROL_CENTER_METRICS_INSPECT
RequestSummarizedMetricData CONTROL_CENTER_METRICS_READ

Creating a Policy

Here's how you create a policy in the Console:

  1. Open the navigation menu and click Identity & Security. Under Identity, click Policies.
  2. In the Policies page, click Create Policy.
  3. In the Create Policy panel, enter a name, description for the policy, and specify the compartment where you want to create the policy.
  4. Under Policy Builder, click the Show manual editor switch to enable the editor.

    Enter a policy rule in the specified format. See policy examples in OCC Policies and Permissions.

  5. Click Create.

For instructions on how to create and manage policies using the Console or API, see Managing Policies.

For a complete list of all policies in Oracle Cloud Infrastructure, see the Policy Reference and Common Policies.

Policy Examples

OCC policies are required for viewing the OCC metric data.

For instructions to create policies using the Console, see Creating a Policy.

For more details about the syntax, see Policy Syntax.

Following policy examples are provided:

Allows the group to list metrics and read metric data.

Allow group <group name> to use control-center-metrics in tenancy

OCC Family Policies

Create this policy in your tenancy, to allow a user or to read all the metrics in OCC:

Allow <user> to read control-center-family in tenancy