GritivaCore introduces a unique Service primitive and Sharing/Ingress model that allows for efficient communication between different scopes. This document outlines the key concepts, definitions, and importance of services and sharing within the GritivaCore framework.
A Service in GritivaCore is defined as a named endpoint within a specific scope that can be consumed by other scopes. The scope that hosts the service is referred to as the producer, while the consuming scopes reference the service using the format <scope>:<service-name>.
The Sharing model in GritivaCore governs which consumer scopes are permitted to access which producer services. It operates on an explicit allow-list principle, meaning that access is denied by default unless explicitly allowed.
The Ingress model is a special type of Sharing rule where the consumer is the public internet, allowing external access via Digital Rights Management (DRM).
Create a service — open the producer scope, then PROJECTS → Services → New service, and give it a name and a port (for example db on 5432).
Allow a consumer — open FLOW, pick the producer service, and add the consumer scope to its allow-list.
Revoke a consumer — remove that scope from the same allow-list; access is denied again immediately, since the model is deny-by-default.
To inspect the rules that currently apply to you from a script, use the REST API:
BASH
# every share you can seecurl -s https://api.gritiva.com/api/v1/access-shares \ -H "X-API-Key: $GRITIVA_API_KEY"# what is available to be sharedcurl -s https://api.gritiva.com/api/v1/access-shares/catalog \ -H "X-API-Key: $GRITIVA_API_KEY"
API keys are issued in the panel under SET. → API keys.
Understanding the Service and Sharing model in GritivaCore is crucial for operators and developers. This framework not only facilitates efficient service consumption but also ensures secure access control through its Sharing rules.
Important Note
Important Note
This document focuses specifically on GritivaCore's Service and Sharing model. It does not cover Kubernetes Services or generic microservices introductions.
Further Reading
Further Reading
For the wider picture of how producers, consumers and ingress fit together, see the [Architecture Overview](/docs/architecture-overview) and [Concepts: DRM](/docs/concepts-drm).