Documentation ¶
Index ¶
- Variables
- func ApplyGraphmanBundle(username string, password string, target string, encpass string, bundle []byte) error
- func ApplyToGraphmanTarget(path string, secretBundle []byte, singleton bool, username string, ...) error
- func BuildAndValidateBundle(path string) ([]byte, error)
- func BuildCWPBundle(cwps []securityv1.Property) ([]byte, string, error)
- func BuildCustomListenPortBundle(gw *securityv1.Gateway, refreshOnKeyChanges bool) ([]byte, string, error)
- func BuildDefaultListenPortBundle(refreshOnKeyChanges bool) ([]byte, string, error)
- func BuildLayer7PolicyXml(name string, gatewayHost string, fipId string) ([]byte, error)
- func BuildOtkOverrideBundle(mode string, gatewayHost string, otkPort int) ([]byte, string, error)
- func CloneRepository(url string, username string, token string, privateKey []byte, ...) (string, error)
- func CompressGraphmanBundle(path string) ([]byte, error)
- func ConcatBundles(bundleMap map[string][]byte) ([]byte, error)
- func Contains(arr []string, str string) bool
- func ConvertCertsToGraphmanBundle(certs []GraphmanCert, notFound []string) ([]byte, error)
- func ConvertOpaqueMapToGraphmanBundle(secrets []GraphmanSecret, notFound []string) ([]byte, error)
- func ConvertX509ToGraphmanBundle(keys []GraphmanKey, notFound []string) ([]byte, error)
- func DefaultLabels(name string, additionalLabels map[string]string) map[string]string
- func DownloadArtifact(URL string, username string, token string, name string, forceUpdate bool, ...) (string, error)
- func GenerateSharedStateClientConfig(configType string, redisConfigs []RedisClientConfig, ...) ([]byte, error)
- func GetHostname() (string, error)
- func GetOperatorNamespace() (string, error)
- func GetOtelCollectorUrl() (string, error)
- func GetOtelEnabled() (bool, error)
- func GetOtelMetricPrefix() (string, error)
- func GetPortalAccessToken(name string, authServer string, clientId string, clientSecret string) (string, error)
- func GetWatchNamespace() (string, error)
- func GetWebhookEnabled() (bool, error)
- func InitOTelProvider(collectorURL string, ctx context.Context) (func(context.Context) error, error)
- func RemoveL7API(username string, password string, target string, apiName string, ...) error
- func RestCall(method string, URL string, insecureSkipVerify bool, headers map[string]string, ...) ([]byte, error)
- func Untar(folderName string, repoName string, tarStream io.Reader, gz bool) error
- func Unzip(src string, dest string) error
- type AssertionComment
- type AuthenticateAgainstIdpAssertion
- type Bundle
- type CachedSyncRequest
- type CommentAssertion
- type CommentAssertionComment
- type EncapsulatedAssertion
- type GPolicy
- type GraphmanCert
- type GraphmanKey
- type GraphmanOtkConfig
- type GraphmanSecret
- type HttpMapping
- type IdentityProviderOid
- type Item
- type Mapping
- type MappingEntry
- type MappingProperties
- type MappingSource
- type Mappings
- type OneOrMore
- type Policy
- type PolicyBody
- type PolicyDetail
- type PolicyDetailProperties
- type PolicyProperty
- type PolicyResource
- type PolicyResourceSet
- type PolicyResources
- type PolicyStringValue
- type PolicyXml
- type PortalBundle
- type PortalPapiToken
- type Properties
- type Property
- type RedisClientConfig
- type RedisConfigBlock
- type RedisNode
- type RedisSentinel
- type RedisSsl
- type References
- type Resource
- type Service
- type ServiceDetail
- type ServiceMappings
- type ServiceProperties
- type ServiceProperty
- type ServiceResource
- type ServiceResourceSet
- type ServiceResources
- type SetVariableAssertion
- type SharedStateClientConfigType
- type SyncCache
- type SyncRequest
- type Verbs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WatchNamespaceEnvVar = "WATCH_NAMESPACE" OperatorNamespaceEnvVar = "OPERATOR_NAMESPACE" EnableWebHookEnvVar = "ENABLE_WEBHOOK" EnableOtelEnvVar = "ENABLE_OTEL" OtelCollectorUrlEnvVar = "OTEL_EXPORTER_OTLP_ENDPOINT" OtelMetricPrefixEnvVar = "OTEL_METRIC_PREFIX" HostNameEnvVar = "HOSTNAME" )
View Source
var ErrInvalidFileFormatError = errors.New("InvalidFileFormat")
View Source
var ErrInvalidTarArchive = errors.New("InvalidTarArchive")
View Source
var ErrInvalidZipArchive = errors.New("InvalidZipArchive")
Functions ¶
func ApplyGraphmanBundle ¶ added in v1.0.2
func ApplyToGraphmanTarget ¶
func BuildAndValidateBundle ¶ added in v1.0.4
func BuildCWPBundle ¶
func BuildCWPBundle(cwps []securityv1.Property) ([]byte, string, error)
func BuildLayer7PolicyXml ¶ added in v1.0.4
func BuildOtkOverrideBundle ¶ added in v1.0.4
func CloneRepository ¶
func CompressGraphmanBundle ¶
func ConcatBundles ¶ added in v1.1.0
func ConvertCertsToGraphmanBundle ¶ added in v1.1.0
func ConvertCertsToGraphmanBundle(certs []GraphmanCert, notFound []string) ([]byte, error)
func ConvertOpaqueMapToGraphmanBundle ¶ added in v1.0.2
func ConvertOpaqueMapToGraphmanBundle(secrets []GraphmanSecret, notFound []string) ([]byte, error)
func ConvertX509ToGraphmanBundle ¶ added in v1.0.2
func ConvertX509ToGraphmanBundle(keys []GraphmanKey, notFound []string) ([]byte, error)
func DefaultLabels ¶
func DownloadArtifact ¶ added in v1.0.4
func DownloadArtifact(URL string, username string, token string, name string, forceUpdate bool, namespace string) (string, error)
Download Artifact retrieves a compressed Graphman Bundle from an HTTP URL This is currently limited to URLs that contain the file extension as would be the case when targeting releases from Git releases. The following extensions are accepted .tar, .tar.gz, .zip
func GenerateSharedStateClientConfig ¶ added in v1.0.7
func GenerateSharedStateClientConfig(configType string, redisConfigs []RedisClientConfig, hazelcastConfigs interface{}) ([]byte, error)
Redis is currently the only supported shared state client that supports the new configuration.
func GetHostname ¶ added in v1.0.7
func GetOperatorNamespace ¶
GetOperatorNamespace returns the namespace of the operator pod
func GetOtelCollectorUrl ¶ added in v1.0.7
func GetOtelEnabled ¶ added in v1.0.7
func GetOtelMetricPrefix ¶ added in v1.0.7
func GetPortalAccessToken ¶ added in v1.0.4
func GetWatchNamespace ¶
GetWatchNamespace returns the namespace the operator should be watching for changes
func GetWebhookEnabled ¶ added in v1.0.4
func InitOTelProvider ¶ added in v1.0.7
func RemoveL7API ¶ added in v1.0.4
Types ¶
type AssertionComment ¶ added in v1.0.4
type AssertionComment struct { AssertionComment string `xml:"assertionComment,attr"` Properties MappingProperties `xml:"L7p:Properties"` }
type AuthenticateAgainstIdpAssertion ¶ added in v1.0.4
type AuthenticateAgainstIdpAssertion struct {
IdentityProviderOid IdentityProviderOid `xml:"L7p:IdentityProviderOid"`
}
type Bundle ¶
type Bundle struct { XMLName xml.Name `xml:"l7:Bundle"` XMLNS string `xml:"xmlns:l7,attr"` References References `xml:"l7:References"` Mappings Mappings `xml:"l7:Mappings"` }
type CachedSyncRequest ¶ added in v1.0.2
type CachedSyncRequest struct { SyncRequest // contains filtered or unexported fields }
type CommentAssertion ¶ added in v1.0.4
type CommentAssertion struct {
Comment CommentAssertionComment `xml:"L7p:Comment"`
}
type CommentAssertionComment ¶ added in v1.0.4
type CommentAssertionComment struct {
StringValue string `xml:"stringValue,attr"`
}
type EncapsulatedAssertion ¶ added in v1.0.4
type EncapsulatedAssertion struct { AssertionComment *AssertionComment `xml:"L7p:AssertionComment"` EncapsulatedAssertionConfigGuid PolicyStringValue `xml:"L7p:EncapsulatedAssertionConfigGuid"` EncapsulatedAssertionConfigName PolicyStringValue `xml:"L7p:EncapsulatedAssertionConfigName"` Parameters MappingProperties `xml:"L7p:Parameters"` }
type GraphmanCert ¶ added in v1.1.0
type GraphmanCert struct { Name string `json:"name,omitempty"` Crt string `json:"crt,omitempty"` TrustedFor []string `json:"trustedFor,omitempty"` VerifyHostname bool `json:"verifyHostname,omitempty"` RevocationCheckPolicyType string `json:"revocationCheckPolicyType,omitempty"` RevocationCheckPolicyName string `json:"revocationCheckPolicyName,omitempty"` TrustAnchor bool `json:"trustAnchor,omitempty"` }
type GraphmanKey ¶ added in v1.0.2
type GraphmanOtkConfig ¶ added in v1.0.4
type GraphmanSecret ¶ added in v1.0.2
type HttpMapping ¶ added in v1.0.4
type IdentityProviderOid ¶ added in v1.0.4
type IdentityProviderOid struct {
GoidValue string `xml:"goidValue,attr"`
}
type Mapping ¶
type Mapping struct { Action string `xml:"action,attr"` SrcId string `xml:"srcId,attr"` Type string `xml:"type,attr"` Properties Properties `xml:"l7:Properties"` }
type MappingEntry ¶ added in v1.0.4
type MappingEntry struct { Key PolicyStringValue `xml:"L7p:key"` Value PolicyStringValue `xml:"L7p:value"` }
type MappingProperties ¶ added in v1.0.4
type MappingProperties struct { MapValue string `xml:"mapValue,attr"` Entry []MappingEntry `xml:"L7p:entry"` }
type MappingSource ¶ added in v1.1.0
type OneOrMore ¶ added in v1.0.4
type OneOrMore struct { Text string `xml:",chardata"` Usage string `xml:"Usage,attr"` CommentAssertion *CommentAssertion `xml:"L7p:CommentAssertion"` Authentication AuthenticateAgainstIdpAssertion `xml:"L7p:Authentication"` Encapsulated EncapsulatedAssertion `xml:"L7p:Encapsulated"` }
type Policy ¶ added in v1.0.4
type Policy struct { Guid string `xml:"guid,attr"` ID string `xml:"id,attr"` Version string `xml:"version,attr"` PolicyDetail PolicyDetail `xml:"l7:PolicyDetail"` Resources PolicyResources }
type PolicyBody ¶ added in v1.0.4
type PolicyBody struct { Usage string `xml:"wsp:Usage,attr"` CommentAssertion *CommentAssertion `xml:"L7p:CommentAssertion"` SetVariable *[]SetVariableAssertion `xml:"L7p:SetVariable"` OneOrMore *OneOrMore `xml:"wsp:OneOrMore"` }
type PolicyDetail ¶ added in v1.0.4
type PolicyDetailProperties ¶ added in v1.0.4
type PolicyDetailProperties struct { Text string `xml:",chardata"` Property []PolicyProperty }
type PolicyProperty ¶ added in v1.0.4
type PolicyResource ¶ added in v1.0.4
type PolicyResourceSet ¶ added in v1.0.4
type PolicyResourceSet struct { Tag string `xml:"tag,attr"` Resource PolicyResource `xml:"l7:Resource"` }
type PolicyResources ¶ added in v1.0.4
type PolicyResources struct {
ResourceSet PolicyResourceSet `xml:"l7:ResourceSet"`
}
type PolicyStringValue ¶ added in v1.0.4
type PolicyStringValue struct {
StringValue string `xml:"stringValue,attr"`
}
type PolicyXml ¶ added in v1.0.4
type PolicyXml struct { XMLName xml.Name `xml:"wsp:Policy"` XMLNSL7p string `xml:"xmlns:L7p,attr"` XMLNSWsp string `xml:"xmlns:wsp,attr"` All PolicyBody `xml:"wsp:All"` }
type PortalBundle ¶ added in v1.0.6
type PortalBundle struct { XMLName xml.Name `xml:"Bundle"` XMLNS string `xml:"xmlns:l7,attr"` References References `xml:"l7:References"` Mappings Mappings `xml:"l7:Mappings"` }
type PortalPapiToken ¶ added in v1.0.4
type Properties ¶
type Properties struct {
Property []Property `xml:"l7:Property"`
}
type RedisClientConfig ¶ added in v1.0.7
type RedisClientConfig struct { Name string `yaml:"name,omitempty"` Type string `yaml:"type,omitempty"` CommandTimeout int `yaml:"commandTimeout,omitempty"` ConnectTimeout int `yaml:"connectTimeout,omitempty"` KeyPrefixGroupName string `yaml:"keyPrefixGroupName,omitempty"` TestOnStart bool `yaml:"testOnStart"` Username string `yaml:"username,omitempty"` EncodedPassword string `yaml:"encodedPassword,omitempty"` Password string `yaml:"password,omitempty"` Standalone RedisNode `yaml:"standalone,omitempty"` Sentinel RedisSentinel `yaml:"sentinel,omitempty"` Ssl RedisSsl `yaml:"ssl"` }
type RedisConfigBlock ¶ added in v1.0.7
type RedisConfigBlock struct {
Default RedisClientConfig `yaml:"default,omitempty"`
}
type RedisSentinel ¶ added in v1.0.7
type References ¶
type References struct {
Item []Item `xml:"l7:Item"`
}
type Service ¶ added in v1.0.4
type Service struct { ID string `xml:"id,attr"` L7 string `xml:"l7,attr"` ServiceDetail ServiceDetail `xml:"l7:ServiceDetail"` Properties ServiceProperty `xml:"l7:Properties"` Resources ServiceResources `xml:"l7:Resources"` }
type ServiceDetail ¶ added in v1.0.4
type ServiceDetail struct { Text string `xml:",chardata"` FolderId string `xml:"folderId,attr"` ID string `xml:"id,attr"` Name string `xml:"l7:Name"` Enabled bool `xml:"l7:Enabled"` ServiceMappings ServiceMappings `xml:"l7:ServiceMappings"` Properties ServiceProperties `xml:"l7:Properties"` }
type ServiceMappings ¶ added in v1.0.4
type ServiceMappings struct {
HttpMapping HttpMapping
}
type ServiceProperties ¶ added in v1.0.4
type ServiceProperties struct {
Property []ServiceProperty `xml:"l7:Property"`
}
type ServiceProperty ¶ added in v1.0.4
type ServiceResource ¶ added in v1.0.4
type ServiceResourceSet ¶ added in v1.0.4
type ServiceResourceSet struct { Tag string `xml:"tag,attr"` Resource ServiceResource `xml:"l7:Resource"` }
type ServiceResources ¶ added in v1.0.4
type ServiceResources struct {
ResourceSet ServiceResourceSet `xml:"l7:ResourceSet"`
}
type SetVariableAssertion ¶ added in v1.0.4
type SetVariableAssertion struct { AssertionComment AssertionComment `xml:"L7p:AssertionComment"` Base64Expression PolicyStringValue `xml:"L7p:Base64Expression"` VariableToSet PolicyStringValue `xml:"L7p:VariableToSet"` }
type SyncCache ¶ added in v1.0.2
type SyncCache struct {
// contains filtered or unexported fields
}
func NewSyncCache ¶ added in v1.0.2
func (*SyncCache) Read ¶ added in v1.0.2
func (sc *SyncCache) Read(requestName string) (SyncRequest, error)
func (*SyncCache) Update ¶ added in v1.0.2
func (sc *SyncCache) Update(sr SyncRequest, expiryTimestamp int64)
type SyncRequest ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.