Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyGraphmanBundle(username string, password string, target string, encpass string, bundle []byte) error
- func ApplyToGraphmanTarget(path string, singleton bool, username string, password string, target string, ...) error
- func BuildAndValidateBundle(path string) ([]byte, error)
- func BuildCWPBundle(cwps []securityv1.Property) ([]byte, string, error)
- func BuildCustomListenPortBundle(gw *securityv1.Gateway) ([]byte, string, error)
- func BuildDefaultListenPortBundle() ([]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 Contains(arr []string, str string) bool
- func ConvertOpaqueMapToGraphmanBundle(secrets []GraphmanSecret) ([]byte, error)
- func ConvertX509ToGraphmanBundle(keys []GraphmanKey) ([]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 GetOperatorNamespace() (string, error)
- func GetPortalAccessToken(name string, authServer string, clientId string, clientSecret string) (string, error)
- func GetWatchNamespace() (string, error)
- func GetWebhookEnabled() (bool, 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 ClusterProperty
- type CommentAssertion
- type CommentAssertionComment
- type EnabledCipherSuites
- type EnabledFeatures
- type EnabledVersions
- type EncapsulatedAssertion
- type GPolicy
- type GraphmanKey
- type GraphmanOtkConfig
- type GraphmanSecret
- type HttpMapping
- type IdentityProviderOid
- type Item
- type ListenPort
- type Mapping
- type MappingEntry
- type MappingProperties
- 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 PortalPapiToken
- type PrivateKeyReference
- type Properties
- type Property
- type References
- type Resource
- type Service
- type ServiceDetail
- type ServiceMappings
- type ServiceProperties
- type ServiceProperty
- type ServiceResource
- type ServiceResourceSet
- type ServiceResources
- type SetVariableAssertion
- type SyncCache
- type SyncRequest
- type TlsSettings
- type Verbs
Constants ¶
View Source
const EnableWebHookEnvVar = "ENABLE_WEBHOOK"
View Source
const WatchNamespaceEnvVar = "WATCH_NAMESPACE"
Variables ¶
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 BuildCustomListenPortBundle ¶
func BuildCustomListenPortBundle(gw *securityv1.Gateway) ([]byte, string, error)
func BuildLayer7PolicyXml ¶ added in v1.0.4
func BuildOtkOverrideBundle ¶ added in v1.0.4
func CloneRepository ¶
func CompressGraphmanBundle ¶
func ConvertOpaqueMapToGraphmanBundle ¶ added in v1.0.2
func ConvertOpaqueMapToGraphmanBundle(secrets []GraphmanSecret) ([]byte, error)
func ConvertX509ToGraphmanBundle ¶ added in v1.0.2
func ConvertX509ToGraphmanBundle(keys []GraphmanKey) ([]byte, error)
func DefaultLabels ¶
func DownloadArtifact ¶ added in v1.0.4
func DownloadArtifact(URL string, username string, token string, name string, forceUpdate bool) (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 GetOperatorNamespace ¶
GetOperatorNamespace returns the namespace of the operator pod
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 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 ClusterProperty ¶
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 EnabledCipherSuites ¶
type EnabledCipherSuites struct {
StringValue []string `xml:"l7:StringValue"`
}
type EnabledFeatures ¶
type EnabledFeatures struct {
StringValue []string `xml:"l7:StringValue"`
}
type EnabledVersions ¶
type EnabledVersions struct {
StringValue []string `xml:"l7:StringValue"`
}
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 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 ListenPort ¶
type ListenPort struct { ID string `xml:"id,attr"` Name string `xml:"l7:Name"` Enabled string `xml:"l7:Enabled"` Protocol string `xml:"l7:Protocol"` Port string `xml:"l7:Port"` EnabledFeatures EnabledFeatures `xml:"l7:EnabledFeatures"` TlsSettings *TlsSettings `xml:"l7:TlsSettings"` Properties Properties `xml:"l7:Properties"` }
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 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 PortalPapiToken ¶ added in v1.0.4
type PrivateKeyReference ¶
type Properties ¶
type Properties struct {
Property []Property `xml:"l7:Property"`
}
type References ¶
type References struct {
Item []Item `xml:"l7:Item"`
}
type Resource ¶
type Resource struct { ClusterProperty *ClusterProperty `xml:"l7:ClusterProperty,omitempty"` ListenPort *ListenPort `xml:"l7:ListenPort,omitempty"` Policy *Policy `xml:"l7:Policy,omitempty"` Service *Service `xml:"l7:Service,omitempty"` }
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 ServiceResource struct {
Type string `xml:"type,attr"`
}
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
type TlsSettings ¶
type TlsSettings struct { ClientAuthentication string `xml:"l7:ClientAuthentication"` PrivateKeyReference PrivateKeyReference `xml:"l7:PrivateKeyReference"` EnabledVersions EnabledVersions `xml:"l7:EnabledVersions"` EnabledCipherSuites EnabledCipherSuites `xml:"l7:EnabledCipherSuites"` UseCipherSuitesOrder bool `xml:"l7:UseCipherSuitesOrder"` Properties Properties `xml:"l7:Properties"` }
Click to show internal directories.
Click to hide internal directories.