Documentation ¶
Index ¶
- Variables
- func NewCMPmTLSAccessStrategyExecutor(certCache credloader.CertCache, ...) *cmpMTLSAccessStrategyExecutor
- func NewOpenAccessStrategyExecutor() *openAccessStrategyExecutor
- type AccessStrategies
- type AccessStrategy
- type Executor
- type ExecutorProvider
- type HTTPRoundTripper
- type Provider
- type Type
Constants ¶
This section is empty.
Variables ¶
var UnsupportedErr = errors.New("unsupported access strategy")
UnsupportedErr is an error produced when execution of unsupported access strategy takes place.
Functions ¶
func NewCMPmTLSAccessStrategyExecutor ¶
func NewCMPmTLSAccessStrategyExecutor(certCache credloader.CertCache, tenantProviderFunc func(ctx context.Context) (string, error), externalClientCertSecretName string) *cmpMTLSAccessStrategyExecutor
NewCMPmTLSAccessStrategyExecutor creates a new Executor for the CMP mTLS Access Strategy
func NewOpenAccessStrategyExecutor ¶
func NewOpenAccessStrategyExecutor() *openAccessStrategyExecutor
NewOpenAccessStrategyExecutor creates a new Executor for the Open Access Strategy
Types ¶
type AccessStrategies ¶
type AccessStrategies []AccessStrategy
AccessStrategies is a slice of AccessStrategy objects
func (AccessStrategies) GetSupported ¶
func (as AccessStrategies) GetSupported() (Type, bool)
GetSupported returns the first AccessStrategy in the slice that is supported by CMP
type AccessStrategy ¶
type AccessStrategy struct { Type Type `json:"type"` CustomType Type `json:"customType"` CustomDescription string `json:"customDescription"` }
AccessStrategy is an ORD object
func (AccessStrategy) Validate ¶
func (as AccessStrategy) Validate() error
Validate validates a given access strategy
type Executor ¶
type Executor interface {
Execute(ctx context.Context, client *http.Client, url, tnt string, additionalHeaders *sync.Map) (*http.Response, error)
}
Executor defines an interface for execution of different access strategies
type ExecutorProvider ¶
ExecutorProvider defines an interface for access strategy executor provider
type HTTPRoundTripper ¶
type HTTPRoundTripper interface { RoundTrip(*http.Request) (*http.Response, error) Clone() HTTPRoundTripper GetTransport() *http.Transport }
HTTPRoundTripper missing godoc
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is responsible to provides an access strategy executors
func NewDefaultExecutorProvider ¶
func NewDefaultExecutorProvider(certCache credloader.CertCache, externalClientCertSecretName string) *Provider
NewDefaultExecutorProvider returns a new access strategy executor provider with the default static type <-> executor mapping
func NewExecutorProvider ¶
NewExecutorProvider returns a new access strategy executor provider based on type <-> executor mapping
func NewExecutorProviderWithTenant ¶
func NewExecutorProviderWithTenant(certCache credloader.CertCache, tenantProviderFunc func(ctx context.Context) (string, error), externalClientCertSecretName string) *Provider
NewExecutorProviderWithTenant returns a new access strategy executor provider by given tenant provider function
type Type ¶
type Type string
Type represents the possible type of the AccessStrategy
const ( // OpenAccessStrategy is an AccessStrategyType indicating that the ORD document is not secured OpenAccessStrategy Type = "open" // CMPmTLSAccessStrategy is an AccessStrategyType indicating that the ORD document trusts CMP's client certificate. CMPmTLSAccessStrategy Type = "sap:cmp-mtls:v1" // CustomAccessStrategy is an AccessStrategyType indicating that not a standard ORD security mechanism is used for the ORD document CustomAccessStrategy Type = "custom" // MinDescriptionLength represents the minimal accepted length of the Description field MinDescriptionLength = 1 // MaxDescriptionLength represents the minimal accepted length of the Description field MaxDescriptionLength = 5000 )