4 Configuring Cloud Native Policy and Charging Rules Function Using Cloud Native Core Console
This chapter describes how to configure different services in Oracle Communications Cloud Native Policy and Charging Rules Function (CNPCRF) and how to create policies and manageable objects in CNPCRF using Oracle Communications Cloud Native Core Console.
Cloud Native Core Console Interface
This section provides an overview of the Oracle Communications Cloud Native Core (CNC) Console, which includes a interface to aid in creating policies and manageable objects in CNPCRF.
- Open a web browser and enter the IP address of the CNC Console system.
The login page opens.
- Enter your Username.
- Enter your Password.
- Click Login.
Tha main page opens.
Figure 4-1 CNC Console Interface
Configuring Services and Manageable Objects
This section describes how to create and manage the services and manageable objects that are available to be used in policies.
Managing a Charging Server
Note:
Use pencil icon or trash bin icon available in the next column to edit or update the created charging server.Managing Custom AVPs
This chapter describes how to create, modify, and delete custom third-party attribute-value pairs (AVPs) in the CNPCRF User Interface (UI).
In a wireless network, custom AVPs are used to encapsulate protocol-specific data for routing, authentication, authorization, and accounting information.
About Custom AVPs
Note:
The Diameter messages listed are examples only. There are many messages associated with Diameter.You can create policy conditions to evaluate the presence of both standard (base) and third-party AVPs in Diameter messages or group AVPs during policy execution. A policy condition can check for the presence of both standard and third-party AVPs in incoming Diameter messages and evaluate their values. A policy action can use standard and third-party AVPs for routing, authentication, authorization, and accounting.
Standard AVPs can be included in third-party AVP conditions and actions. To include a standard (base) AVP in a nonstandard application message, or to use a pre-standard AVP as a standard AVP, define it as a custom AVP.
Charging-Rule-Install ::= < AVP Header: 1001 >
*[ Charging-Rule-Definition ]
*[ Charging-Rule-Name ]
*[ Charging-Rule-Base-Name ]
[ Bearer-Identifier ]
[ Rule-Activation-Time ]
[ Rule-Deactivation-Time ]
[ Resource-Allocation-Notification ]
[ Charging-Correlation-Indicator ]
*[ customAVP ]
A Set or Get SPR user attribute value can be set to the defined third-party AVP in Diameter messages. You can also set or remove defined third-party AVPs during the execution point.
name:vendorId
For example:
- Condition
where the request AVP NEW_AVP3:555 value is numerically equal to 2012
- Parameters
- The AVP name and vendor ID. In the example, the vendor ID is 555.
- Description
- A well-defined AVP custom name is referred to if the vendor ID is not specified.
When entering and sending a new third-party AVP definition to an MPE or MRA device, the definition must include the AVP name, code, vendor ID, data type, and an optional AVP flag.
Validation of the AVP code, Name, and vendor ID prohibits a user from overwriting the existing base AVPs.
- Routing
- Authentication
- Authorization
- Accounting
Managing Custom Vendors
This chapter describes how to create, modify, and delete custom vendor definitions in the CNPCRF User Interface (UI).
Custom vendors are used in RADIUS Change of Authorization (CoA) messages.
Creating a Media Profile
Note:
Media Profiles is a function that is applicable to Cable mode only.To create a media profile:
Note:
Use pencil icon or trash bin icon available in the next column to edit or update the created media profile.Session Viewer
The Session Viewer displays detailed session information for a specific subscriber. Within the session viewer, you can enter query parameters to render session data for a specific subscriber. This section provides information about viewing the sessions.
To view the sessions:
- From the navigation menu, under PCRF, click Session Viewer. The Session Viewer page appears.
- From the Identifier Type drop-down
menu, select the identifier type for the selected session type. Possible values
are:
- DIAMETER SESSION ID
- IMSI
- MSISDN
- IPV4
- Enter the value in the Identifier Value field for the selected identifier type.
- Click Query. Information about the subscriber session(s) is displayed.
If session data is not available, the error is displayed along with No session found.
Configuring Core Service
You can configure the CNPCRF core service from this page.
- From the navigation menu, under PCRF, then under Services , click Core Service.
The Core Service screen appears.
- Click Edit to edit the core service configurations. This enables the Add button in Advance Settings group.
- Click Add. The Add Advanced Settings window opens.
- Enter the values in Key and Value fields.
- Click Save.
Managing Policy
Cloud Native Policy and Charging Rules Function (CNPCRF) offers a Policy Design editor based on Blockly interface. You can create and manage a policy project for PCRF core service.
Settings
You can manage and view the CNPCRF supported services from this page.
- From the navigation menu,
under
Policy
Management, click
Settings.
The Policy Runtime Environment screen appears.
- Click Edit to edit the settings.
- Enter the value in Log Level field. The default value is WARN.
- Click
Add in the
Supported Services group.
The Add Supported Services screen appears.
- Enter the following
information to create service:
- Service Name: Enter the service name.
- Service Label: Enter the service label.
- Relative URL: Enter the relative URL.
- Click Save. The services get listed in the Supported Services list. The supported services are pcrf-core and pds.
Note:
Use Edit or Delete buttons available in the next column to update or delete the services.Creating a Policy Project
- From the Policy Management section of the navigation pane, select Policy Projects.
- Click
Create.
The Create Project window opens.
- In the Name field, enter the name for the project.
- In the Description field, enter the description for the project.
- In the Service Type, select the service from list of services already created in Settings section.
- Click
Save.
The policy project is created.
- Select the policy project
created and click
Open. This opens a Blockly editor.
You can construct one or more policies as required using the building blocks provided in the Left Side Panel of the editor construct one or more Policies as required.
The following screen capture shows an example of how the policies can be created using the building blocks.
- Click
Save.
The policy for the selected policy project is created.
Managing State Variables
- Subscriber Policy Evaluation State Variables — This variable exists locally and has a value as long as the associated subscriber has at least one session. After the last session is terminated these variables no longer have value and will no longer be available for use in policies.
- Session State Variables — This variable has a value that is saved as long as the session the variable is associated with is still valid. After the session is terminated, this variable no longer has value and will no longer be available for use in policies.
- Policy Evaluation State Variables — This variable are available for the lifetime of a policy evaluation cycle (the process of evaluating all the policies for a single request or context)
- Data Source State Variables —
Note:
State Variables are only supported for Session Management service.Creating State Variables Condition
You can use the default blocks provided in Variables section to create state variables condition. However, the following blocks in the State Variables section under the Public section can also be used to create these conditions:
Syntax
operation variable-name in scope contextParameters
operation
- Save- To save the state variable in a specific context.
- Load- To load the state variable from the selected context into policy evaluation.
- Remove- To remove the state variable from the selected context.
- Remove All- To remove all the state variable from the selected context
variable-name
String. Specifies name of the state variable.
Scope
- Policy- Policy evaluation variables that last only for the duration of policy evaluation cycle.
- Session- Session variables that have a value as long as the session they are associated with is open.
- Subscriber- Subscriber variables that are associated with a subscriber that has at least one session.
- Data source
Data Model
You can create and manage sample attributes for policy. This is used for testing the policies.
To create the Data Model from this page:
- From the navigation menu,
under
System
Administration, click
Data Model.
The Data Model Management screen appears with the listing of all the attributes created. You can create or import new attributes from this page.
Note:
Click the Export button to download the available listings to your system. - Click
Add.
The Create Data Model screen appears.
- On the
Create Data Model
screen, enter values for the input fields.
The following table describes the fields:
Field Name Description ID ID of the attribute, not displayed on the GUI. Name Name of the attribute, not displayed on the GUI. Label Name Name of the attribute, displayed on the GUI. Description Description of the attribute Type Select one of the values: enum or object - In the
Fields group,
click
Add
to add the field details:
- Enter the applicable
values in the input fields available on the window.
The following table describes the fields:
Field Name Description Name Name of the field, not displayed on the GUI. Description Description of the field Label Name Name of the field, displayed on the GUI. Type Select either of the values from drop-down (primitive, object, array) Primitive Type Defines the primitive type Units Specifies the units Object Type Defines the object type Item Type Type Select either of the values from drop-down (primitive, object) Primitive Type Defines the primitive type Object Type Defines the object type Note:
Click Remove to cancel the changes. - Click Save.
- Enter the applicable
values in the input fields available on the window.
- In the
Enum Items group, click
Add
to add the field details:
- Enter the applicable
values in the input fields available on the window.
The following table describes the fields:
Field Name Description Name Name of the field, not displayed on the GUI. Value Specify the value. - Click Save.
- Enter the applicable
values in the input fields available on the window.
- Click
Save.
The value gets listed on the Data Model Management screen.
Note:
Use Edit or Delete buttons available in the next column to update or delete the listing.
Importing the Data Model
To import the session rules:
- Click
Import.
The File Upload window appears on the screen.
- Upload the files in required format by clicking Drop Files here or click to upload.
Configuring Policy Common Configurations
This chapter describes how to configure the managed objects which are common to Policy Control Function and Cloud Native Policy Charging and Rules Function.
Connecting to LDAP Data Source
PCRF-core establishes connections with data sources to retrieve information about subscribers from the database. The PCRF-core queries a data source using a key attribute that uniquely identifies a subscriber and stores the results in its cache. A data source uses this key attribute (for example, the phone or account number of the subscriber) to index the information contained in the database.
Oracle Communications Cloud Native Core Policy and Charging Rule Function (PCRF) supports Lightweight Directory Access Protocol (LDAP) data source. Based on the conditions implemented in CNPCRF system, Policy Data Source (PDS) would retrieve all the relevant information from LDAP data source based on the rules configured in the system through LDAP gateway.
LDAP credentails are stored as kubernetes secret along with Authentication DN and LDAP name. You must create a kuberenetes secret to store LDAP credentials before setting a PDS as LDAP data source.
- Create a yaml file with the following
syntax:
apiVersion: v1 kind: Secret metadata: name: ldapsecret labels: type: ocpm.secret.ldap type: Opaque stringData: name: "ldap1" password: "camiant" authDn: "uid=PolicyServer,ou=vodafone,c=hu,o=vodafone"
where, name is the configured LDAP server name.
password is the LDAP credential for that data source.
authDN is the authentication DN for that LDAP datsource.
Note:
For different LDAP data sources more entries can be added in above format only the key of the entry should be the ldap name specified in CNPCRF Graphical User Interface (GUI). - Create the secret by executing the following
command:
kubectl apply -f yaml_file_name -n pcrf-namespace
where:
yaml_file_name is a name of the yaml file that is created in step 1.
pcrf-namespace is the deployment namespace used by the helm command.
To set Policy Data Source as LDAP Data Source using CNPCRF GUI:
- Add LDAP data source. To add LDAP source, From the
navigation menu, under Common
Policy Configuration, then under Data Source Configurations,
click Data Sources. In the
Type drop-down list, select LDAP.
The following screen capture shows the example of adding LDAP data source in GUI:
In the above example, LDAP datasource with name LDAP1 is created. - Edit thepcrf-core deployment file in
vi editor to enable policy data source:
- name: SH_ENABLED value: "false" - name: SY_ENABLED value: "false" - name: USERSERVICE_ENABLED value: "true"
- Create pds service type in CNPCRF
system. To create pds service type, From the navigation menu, under Policy Management, click Settings . On Settings page,
click Add to create pds service type.
The following screen capture shows the example of creating pds service type in GUI:
In the above example, pds service type is created.
Note:
The service name should be entered as pds. - Create Policy Project with pds Service Type. From the
navigation menu, under Policy
Management, click Policy
Projects. On Policy Projects page, click Create to create policy
project. While creating a policy project select pds as a service type.
The following screen capture shows the example of creating policy project with pds service type in GUI:
In the above example, s policy project is created with pds service type.
- Create policy action and condition in previously
created policy project. Click Open for the selected policy project and you
can see the project is a file. You can create the policy action and condition by
using the different blocks available under Conditions and Actions
under PDS.
The following screen capture shows the example of creating policy action and condition in GUI:
In the above example, if request received for configured IMSI ranges between 404050000000001 and 404050000000001, then PCF will forward request to PDS and PDS will forward the request to LDAP gateway to lookup user information in LDAP1.
Managing Match Lists
In a wireless network, a match list is a set of defined values that can represent, for example, IDs or Internet addresses. Match lists provide whitelist and blacklist functions in policy rules. Match lists support wildcard matching.
A match list is a set of values in various categories, including access point names (APNs), subscriber IMSIs, location area codes (LACs), service area codes (SACs), Internet addresses, and user equipment identities. A match list can function as a whitelist (listing items to be included) or a blacklist (listing items to be excluded). By using a match list, you can, for example, apply a policy to all subscribers in a set of LACs, or block access to a list of Internet addresses known to be high risk. Match lists support wildcards. Using wildcards, a range of values can be specified compactly.
Creating a Match List
- From the navigation pane, under Policy Common
Configurations, select Match List.
The Match List Management page opens in the work area.
- Click
Create.
The Create Match List page opens.
- Enter the following
information:
- ID: The ID assigned to the match list.
- Name: The name
assigned to the match list.
The name can only contain the characters A-Z, a-z, 0-9, period (.), hyphen (-), and underline (_). The maximum length is 40 characters.
- Description: Free-form text
- Type: Select
from the following:
- string (default) - The list consists of strings.
- wildcard string - The list consists of wildcard match patterns that use an asterisk (*) to match zero or more characters or a question mark (?) to match exactly one character.
- Items:
- Click Save.
The match list is defined in the database and can now be used in a policy.
Modifying a Match List
- From the navigation pane, under Policy Common
Configurations, select Match List.
The Match List Management page opens in the work area, displaying the list of defined match lists.
- Select the match list you want to modify.
- Click
Edit.
The Edit Match List page opens.
- Modify match list information as required.
- Click
Save.
The match list is modified.
Deleting a Match List
- From the navigation pane, under Policy Common
Configurations, select Match List.
The Match List Management page opens in the work area, displaying the list of defined match lists.
- Select the match list you want to delete.
- Click
Delete.
A confirmation message displays.
- Click
OK.
The match list is deleted.
Importing the Match Lists
To import the match lists:
- Click
Import.
The File Upload window appears on the screen.
- Upload the files in required format by clicking Drop Files here or click to upload.
Exporting the Match Lists
You can export the match lists by clicking Export All. The Match Lists will be downloaded in a local machine.
Importing Configurable Objects
This section describes how to perform a bulk import of configurable objects into the system.
Importing Configuration Object Files
To import json or ZIP files:
- From the navigation pane, under Policy Common
Configurations, click Bulk Import.
The Upload option appears on the screen.
- Click
Upload.
Locate the file to be imported.
- Select a processing option
to use to
Handle collisions between imported items and existing items:
- Delete all before
importing The system deletes all objects for each object type matching the
import file before importing the object type json file.
Attention: This import strategy can result in object inconsistency. For example, if you import a ZIP file that only contains traffic profiles, all the traffic profiles are deleted first. However, if existing policies depend on the existing traffic profiles, and the import file does not contain them, the policies can become invalid.
- Overwrite with imported version For each object in the import file, if the object exists in the system, the import updates the object with the configuration contained in the import file. If an object does not exist, the system adds the object to the system.
- Delete all before
importing The system deletes all objects for each object type matching the
import file before importing the object type json file.
- Click Import.
The configuration objects and their configuration settings are imported into the database. After the import is complete, the window reports the results for each json file contained in the ZIP file.
Exporting Configurable Objects
This section describes how to perform a bulk export of configurable objects.
Exporting All Configuration Object Files
To export all configuration objects:
- From the navigation pane, under Policy Common
Configurations, click Bulk Export.
The Export All option appears on the screen.
- Click
Export All
.
A ZIP file is downloaded to your local computer.