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

note

In the context of the unified witboost experience, configuring resource types will rarely be necessary, as the UI module will handle them seamlessly based on the Practice Shaper setup

The suggested way to register a new resource type is through a POST request to the /v1/computational-governance/resource-types CGP endpoint (refer to the API reference section of the documentation).

Alternatively, it's also possibile to statically configure resource types by configuration (refer to the Computational Governance Platform Configuration section of the documentation).