Skip to main content

Resources

A Resource in the context of the Computational Governance Platform (CGP) refers to any object that can be described by metadata. Those resources, if managed by Witboost, can be evaluated by CGP's Governance Entities so that you can control their compliance within your data governance strategy during their whole lifecycle.

Resources originate from various aspects of the software and data development processes and can encompass a wide range of objects such as datasets, build files, configurations, and more. In the Computational Governance Platform, they are implicitly described by these characteristics:

  • Name: a unique name within the platform to identify each of them
  • Descriptor: Metadata about the resource, usually, but not limited to, a YAML file.
  • Resource Type: As explained in the Overview section, It describes how the descriptor looks like, so that Governance Entities can indicate to be compatible with this type of resource. An example Resource Type is the Data Product, where a descriptor is known to be composed by specific fields e.g. the components field.

Perimeter Resolvers

An evaluation request received by the Computational Governance Platform can be of two types:

  • A Governance Entity test: used to assess if the Policy or Metric performs all needed checks and how it is applied to resources that are already deployed within your organization. The list of resources is the perimeter to which the Governance Entity can be applied.
  • An evaluation request: used to check if a given resource is compliant to all the policies and metrics that can be applied.

Perimeter resolvers are invoked whenever there is a need, like in the case of a test, for retrieving all resources that fall in the Governance Entity's perimeter. Also, the Perimeter Resolver plays a crucial role in retrieving the current resource's descriptor when a Breaking Change Policy or Metric must be executed.

Perimeter Resolvers

A diagram representation of Perimeter Resolvers

Perimeter resolvers allow you to make any resource type evaluable by the CGP, for this reason they can extend the type of perimeters in a technology-agnostic way.

Extending supported Resource Types

Computational Governance Platform is capable of working with different types of resources. To extend the list of Resource Types compatible with the Computational Governance Platform, you will need:

  • A service implementing the Perimeter Resolver API
  • Add the new Resource Type configuration in the Computational Governance Platform's application.conf

Perimeter Resolver API

A Perimeter Resolver must be compliant with the following OpenAPI specification in order to be correctly contacted by the Computational Governance Platform for retrieving resources:

Perimeter Resolver OpenAPI Specification
openapi: 3.0.3
info:
title: Perimeter resolver specification
description: 'Service responsible to manage requests from the computational governance platform querying for resources.'
version: '0.1'
tags:
- name: PerimeterResolver
paths:
/v1/resolve:
get:
tags:
- PerimeterResolver
summary: Get a list of resources based on the input parameters
operationId: resolve
parameters:
- name: environment
in: query
description: the environment in which look for resources
required: true
schema:
type: string
- name: id
in: query
description: the resource id
required: false
schema:
type: string
responses:
200:
description: Returns a list or a single element of resource
content:
application/json:
schema:
$ref: '#/components/schemas/PerimeterResource'
404:
description: if no resources are found
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
500:
description: System problem
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PerimeterResource:
required:
- content
type: object
properties:
content:
type: array
items:
type: string
Error:
required:
- error
type: object
properties:
error:
type: string

The resource retrieved by the perimeter resolver is a Data Product descriptor that is not enriched with all the provisioning results, i.e. a descriptor that does not contain deployInfo and buildInfo fields.

Configuring a new Resource Type

To let the Computational Governance Platform be able to start fetching and evaluating resources of your new Resource Type, you need to adjust the application.conf in this way:

computational-governance-platform = {
# CGP configurations...

resource-types = [
# Other configured Resource Types...


{
name = "catalog_table"
configuration = {
resource-name = "id"
resource-display-name = ["domain", "name", "version"]
resource-filter = "version"
batch-size = 5
}
resolver-configuration = {
url = "http://your-awesome-service/"
path = "v1/resolve"
}
}
]
}

As shown above, the configuration for your new Perimeter Resolver should be placed within the CGP's configuration settings. This ensures that the list of Resource Types available in the creation wizard is updated and the CGP can correctly identify and fetch them.

Here is a detailed explanation of each field in a Resource Type configuration:

  • name: it is the resource type's unique name.
  • configuration: it has some information about the shape of descriptors of this resource type.
    • resource-name: the field's path inside the resource's descriptor that contains its unique name
    • resource-display-name: a list of fields paths to be used to generate a display name
    • resource-filter: a field's path useful to distinguish evaluation results for the same resource (e.g. the resource's version)
    • batch-size: optional, how many resources this resolver is able to send in each request
  • resolver-configuration: contains the details about the service implementing the Perimeter Resolver API
    • url: base URL of the Perimeter Resolver service.
    • path: path to the v1/resolve endpoint.