appsec

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package appsec contains implementation for Akamai Terraform sub-provider responsible for Application Security

Index

Constants

View Source
const (
	APITarget     = "API"
	WebsiteTarget = "Website"
)

Definition of constant variables

View Source
const (
	Alert = "alert"
	Deny  = "deny"
	None  = "none"
)

Constant values

View Source
const (
	Start    = "START"
	Stop     = "STOP"
	Restart  = "RESTART"
	Update   = "UPDATE"
	Complete = "COMPLETE"
)

Definition of constant variables

View Source
const (
	Allow = "allow"
	Block = "block"
)

Definition of constant variables

View Source
const (
	Append  = "APPEND"
	Replace = "REPLACE"
	Remove  = "REMOVE"
)

Append Replace Remove mode flags

View Source
const (
	// AAG = Automated Attack Groups
	AAG = "AAG"

	// KRS = Kona Rule Sets
	KRS = "KRS"

	// AseAuto = Adaptive Security Engine - Auto
	AseAuto = "ASE_AUTO"

	// AseManual = Adaptive Security Engine - Manual
	AseManual = "ASE_MANUAL"
)

Definition of constant variables

View Source
const (
	Abort = "abort"
)

Definition of constant variables

View Source
const (
	// ActivationPollMinimum is the minimum polling interval for activation creation
	ActivationPollMinimum = time.Minute
)
View Source
const SubproviderName = "appsec"

SubproviderName defines name of the appsec subprovider

Variables

View Source
var (

	// GetModifiableConfigVersion returns the number of the latest editable version
	// of the given security configuration. If the most recent version is not editable
	// (because it is active in staging or production) a new version is cloned and the
	// new version's number is returned. API calls are made using the supplied context
	// and the API client obtained from m. Log messages are written to m's logger. A
	// mutex prevents calls made by multiple resources from creating unnecessary clones.
	GetModifiableConfigVersion = getModifiableConfigVersion
	// GetLatestConfigVersion returns the latest version number of the given security
	// configuration. API calls are made using the supplied context and the API client
	// obtained from m. Log messages are written to m's logger.
	GetLatestConfigVersion = getLatestConfigVersion
)
View Source
var (
	// ActivationPollInterval is the interval for polling an activation status on creation
	ActivationPollInterval = ActivationPollMinimum

	// AppsecResourceTimeout is the default timeout for the resource operations
	AppsecResourceTimeout = time.Minute * 90

	// CreateActivationRetry poll wait time code waits between retries for activation creation
	CreateActivationRetry = 10 * time.Second
)

Functions

func InitTemplates

func InitTemplates(otm map[string]*OutputTemplate)

InitTemplates populates map of templates given as argument with output templates

func RenderTemplates

func RenderTemplates(ots map[string]*OutputTemplate, key string, str interface{}) (string, error)

RenderTemplates renders a template and returns it as a string.

func ValidateActions

func ValidateActions(v interface{}, path cty.Path) diag.Diagnostics

ValidateActions ensure actions are correct for API call

func VerifyIDUnchanged

func VerifyIDUnchanged(_ context.Context, d *schema.ResourceDiff, m interface{}) error

VerifyIDUnchanged compares the configuration's value for the configuration ID with the resource's value specified in the resources's ID, to ensure that the user has not inadvertently modified the configuration's value; any such modifications indicate an incorrect understanding of the Update operation.

Types

type MatchTargetOutputText

type MatchTargetOutputText struct {
	TargetID int
	PolicyID string
	Type     string
}

MatchTargetOutputText holds data for templates

type OutputTemplate

type OutputTemplate struct {
	TemplateName   string
	TemplateType   string
	TableTitle     string
	TemplateString string
}

OutputTemplate contains template data

func GetTemplate

func GetTemplate(ots map[string]*OutputTemplate, key string) (*OutputTemplate, error)

GetTemplate given map of templates and a key, returns template stored under this key

type OutputTemplates

type OutputTemplates map[string]*OutputTemplate

OutputTemplates is a map of templates

type Subprovider

type Subprovider struct {
	// contains filtered or unexported fields
}

Subprovider gathers appsec resources and data sources

func NewSubprovider

func NewSubprovider(opts ...option) *Subprovider

NewSubprovider returns a new appsec subprovider

func (*Subprovider) Client

func (p *Subprovider) Client(meta meta.Meta) appsec.APPSEC

Client returns the APPSEC interface

func (*Subprovider) FrameworkDataSources

func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource

FrameworkDataSources returns the appsec data sources implemented using terraform-plugin-framework

func (*Subprovider) FrameworkResources

func (p *Subprovider) FrameworkResources() []func() resource.Resource

FrameworkResources returns the appsec resources implemented using terraform-plugin-framework

func (*Subprovider) SDKDataSources

func (p *Subprovider) SDKDataSources() map[string]*schema.Resource

SDKDataSources returns the appsec data sources implemented using terraform-plugin-sdk

func (*Subprovider) SDKResources

func (p *Subprovider) SDKResources() map[string]*schema.Resource

SDKResources returns the appsec resources implemented using terraform-plugin-sdk

Source Files

Jump to

Keyboard shortcuts

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