Understanding, Creating, and Managing Permission Policies - m3ter Documentation

Permission Policies Overview

You can create Permission Policies for your Users and assign these Permission Policies to them. There are two types of Permission Policies you can assign to Users:

When you create a Custom Permission Policy, you can add statements to the policy that allow or deny actions for specific resources. This allows you to control very precisely what a User who has been given access to your Organization can and cannot do. For example, you might want to create a Permissions Policy that denies Users the ability to retrieve Meters. This section explains the m3ter permissions model, lists the actions and resources you can use when adding statements to create Permission Policies, and how to create and manage your Custom Permissions Policies:

Warning - Check for Exceptions! There are instances where exceptions to the general permissions framework might occur as a result of shared data. See the Permissions Exceptions section below for more details.

Understanding the m3ter Permissions Model

The m3ter Permissions model is implemented using a three-fold framework of Effect, Action, and Resource:

In JSON format, the general schema for a Permission is:

{
  "Effect": {effect},
  "Action": [{action}],
  "Resource": [{resource}]
}

Resources

Resources are defined as m3ter Resource Identifiers (MRIs) in the format:

service:resource-type/item-type/id

Where:

For example:

config:plan/item/12345

config:plan/group/987

Use of Wildcards for Resources

The use of wildcards when denoting resources is allowed. For example, to denote all Plans as the resource in a permission statement, you can use:

config:plan/*

Tip: Available Resources? Please see the following section for a full list of available resources by service you can use in statements when creating your Permission Policies.

Actions

Actions define what a User is either allowed or not allowed to do with respect to a resource. For example, you can use a config:create and config:retrieve action to create a statement for a Permission Policy that allows Users to create or retrieve any Plan in your Organization. But if this is the only Permission Policy assigned to a User, they will not be able to update or delete any Plans:

{
  "effect": "allow",
  "action": [
    "config:create",
    "config:retrieve"
  ],
  "resource": [
    "config:plan/*"
  ]
}

Please see the following section for full details and explanation on using actions against resources when creating statements for your Permission Policies.

Effects and Evaluation Logic

The effect for a Permission Policy is either to allow or to deny:

If you create a Permission Policy with multiple statements this is how evaluation of access to a resource for a given action is applied:

Permission Policy Statements - Available Actions and Resources

This section lists the actions and resources available for compiling statements you add to your custom Permission Policies.

Statements - Available Actions

When creating statements for Permission Policies, actions always require a resource-type to operate against.

Some actions also require a resource path - either a specific item or group to be defined or a wildcard ‘*' to indicate all items of the resource-type. For a config:create action, no resource path is required and we use a wildcard to apply denial of meter creation to all meters:

{
  "effect": "deny",
  "action": ["config:create"],
  "resource": ["config:meter/*"]
}

However, for a config:retrieve action, a resource path is required:

{
  "effect": "deny",
  "action": ["config:retrieve"],
  "resource": ["config:meter/item/456"]
}

For actions that don’t require a path, paths in associated MRIs will be ignored, and only the resource-type will be used. You can use the following actions when creating Permission Policy statements:

Action MRI Path Required?
config:create No
config:retrieve Yes
config:update Yes
config:delete Yes
measurements:upload Yes
measurements:fileUpload Yes
measurements:retrieve Yes
exports:download Yes
ALL *

Which Actions can I use with which Resources?

For the resources listed in the following section, the Actions you can use when creating Permission Policy Statements are determined by Resource type:

Examples
{
  "effect": "allow",
  "action": [
    "config:create",
    "config:retrieve",
    "config:update",
    "config:delete"
  ],
  "resource": [
    "billing:bill/*",
    "billing:balance/*",
    "billing:billjob/*",
    "billing:credit/*",
    "billing:creditAdjustment/*",
    "config:account/*",
    "config:accountPlan/*",
    "config:commitment/*",
    "config:contract/*",
    "config:plan/*",
    "config:planGroup/*",
    "config:planGroupLink/*",
    "statement:statement/*",
    "statementjob:statementjob/*"
  ]
}

This means that all members of the Billing Operations Team will have full CRUD access to all resources of the type specified.

{
  "effect": "allow",
  "action": [
    "measurements:upload",
    "measurements:fileUpload",
    "measurements:retrieve"
  ],
  "resource": [
    "measurements:data/*"
  ]
}
{
  "effect": "allow",
  "action": [
    "config:create",
    "config:delete",
    "config:retrieve",
    "config:update"
  ],
  "resource": [
    "config:exportDestination/*",
    "config:exportSchedules/*",
    "config:exportStatus/*"
  ]
}
{
  "effect": "allow",
  "action": [
    "exports:download"
  ],
  "resource": [
    "exports:data/*"
  ]
}

Statements - Available Resources

You can use the following resources when creating Permission Policy statements:

Resource Policy Statement Format
ALL *
action
ACTION_PERFORMED action:actionPerformed
analytics
USAGE analytics:usage
billing
BALANCE billing:balance
BILL billing:bill
BILL_JOB billing:billjob
CHARGE billing:charge
BILL_CONFIG billing:config
COUNTER_ADJUSTMENT billing:counterAdjustment
CREDIT billing:credit
CREDIT_ADJUSTMENT billing:creditAdjustment
BILL_LOCK billing:lock
SCHEDULED_VALIDATION billing:validation
config
ACCOUNT config:account
ACCOUNT_PLAN config:accountPlan
ACTION config:action
ACTION_TRIGGER config:actionTrigger
AGGREGATION config:aggregation
ALERT config:alert
ANALYTICS_JOB config:analyticsJob
COMMITMENT config:commitment
CONTRACT config:contract
COUNTER config:counter
PICKLIST_CREDIT_REASON config:creditReason
CREDIT_TYPE config:creditType
PICKLIST_CURRENCY config:currency
CUSTOM_FIELD config:customField
DATA_EXPLORER_SELECTION config:dataExplorerSelection
PICKLIST_DEBIT_REASON config:debitReason
EVENT config:event
EXTERNAL_MAPPING config:externalMapping
INTEGRATION config:integration
METER config:meter
METER_GROUP config:metergroup
NOTIFICATION config:notification
ORGANIZATION_CONFIG config:organizationConfig
OUTGOING_INTEGRATION config:outgoingIntegration
PERMISSION_POLICY config:permissionPolicy
PRINCIPAL_PERMISSION config:principalPermission
PLAN config:plan
PLAN_GROUP config:planGroup
PLAN_GROUP_LINK config:planGroupLink
PLAN_TEMPLATE config:planTemplate
PRODUCT config:product
REPORT_SELECTION config:reportSelection
RESOURCE_GROUP config:resourceGroup
SERVICE_USER config:serviceUser
SUPPORT_USERS config:supportUsers
TEMPLATE config:template
PICKLIST_TRANSACTION_TYPE config:transactionType
ORG_USER config:user
ORG_USER_INVITATION config:orgUserInvitation
EXPORT_DESTINATION config:exportDestination
EXPORT_SCHEDULES config:exportSchedules
EXPORT_STATUS config:exportStatus
SCHEDULED_EVENT config:scheduledEvent
USAGE_SAVED_QUERY config:usageSavedQuery
integration
INTEGRATION_CONFIG integration:integrationConfig
INTEGRATION_CREDENTIALS integration:integrationCredentials
INTEGRATION_DESTINATION integration:integrationDestination
INTEGRATION_RUN integration:integrationRun
INTEGRATION_MARKETPLACE_USAGE integration:marketplaceUsage
measurements
MEASUREMENTS measurements:data
MEASUREMENTS_VALIDATION_ERRORS measurements:validationErrors
statement
STATEMENT statement:statement
statement definition
STATEMENT_DEFINITION statementdefinition:statementdefinition
statement job
STATEMENT_JOB statementjob:statementjob
exports
EXPORTS_JOB exports:data

Creating Custom Permission Policies

In the Settings area of the Console, you can quickly create and manage Custom Permission Policies.

Important: Access to Console! To enable any Users who are assigned Custom Permission Policies to access the m3ter Console, please ensure that one of their Permission Policies includes a Statement that allows them to Retrieve two Resources:

Without these permissions Users will be unable to access the Console - see step 9 in the following procedure.

To create and manage Permission Policies:

  1. Select Settings:
  2. Select Access settings:
  3. Select the Permission policies tab:
  4. Select Create permission policy. The Create page opens.
  5. Under Permission policy details, enter a descriptive Name for the new Permission Policy.
  6. Under Permission policy statements, you have the option to use either a Simple or Advanced editor to add Statements to the Permission Policy.
  7. Leave the Simple editor selected. Here’s an example of how to compile Statements using the Advanced editor to allow all actions for all Meters:
  8. Select Advanced if you want to add JSON formatted Statements.
  9. If you want to add another JSON formatted Statement, select Add. A new Statement text editor window is shown:
  10. When you have finished adding all of the required Statements for the Permission Policy, select Create permission policy.
  11. Select Edit to edit the new policy.
  12. If you want to delete a Permission Policy, return to the Permission policies tab and select the delete icon for the Policy:

Tip: Using API Call to Create Permission Policy? You can use the Create Permission Policy config API call.

Permissions Exceptions

There are instances where exceptions to the general permissions framework can occur as a result of shared data: