PolicyProvider

package
v0.6.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package PolicyProvider defines the common structures and interfaces (the API) to be implemented by each platform that Hexa integrates with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationInfo

type ApplicationInfo struct {
	ObjectID    string `validate:"required"`
	Name        string // Name corresponds to IntegrationInfo.name
	Description string
	Service     string // Service describes an identifier for a service to be administered
}

ApplicationInfo describes a unique cloud application environment context where one or more policy systems are found

type IntegrationInfo

type IntegrationInfo struct {
	Name string // A unique Name identifying the platform integration.
	Key  []byte // Key is encoded JSON access data or token used to access a platform
}

IntegrationInfo is a structure that provides the basic connectivity information to a platform.

type PolicyContext

type PolicyContext struct {
	ApplicationInfo
	PapResource []hexapolicy.ObjectInfo // Identifies the deployment point for policy. In some cases this is also the Hexa Policy Object
}

PolicyContext is an extension of ApplicationInfo and defines a Policy Application Point. In some systems this may be the resource object identified within a policy or it may a common PAP.

type Provider

type Provider interface {
	Name() string

	// DiscoverApplications returns the available platform workspaces/projects available based on IntegrationInfo
	DiscoverApplications(IntegrationInfo) ([]ApplicationInfo, error)

	// GetPolicyInfo retrieves all the available policies within an ApplicationInfo project
	GetPolicyInfo(IntegrationInfo, ApplicationInfo) ([]hexapolicy.PolicyInfo, error)

	// SetPolicyInfo updates the provided policies within the ApplicationInfo project
	SetPolicyInfo(IntegrationInfo, ApplicationInfo, []hexapolicy.PolicyInfo) (status int, foundErr error)
}

Provider defines the common interface Hexa uses to connect to platforms to access and update security Policy. Each new Hexa Provider must implement this interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL