osb

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(rootAPI string, serviceBroker domain.ServiceBroker, logger lager.Logger, c *metrics.Collector) func(router *mux.Router)

func IsFailed

func IsFailed(status *schema.BundleInstanceAuthStatus) bool

func IsInProgress

func IsInProgress(status *schema.BundleInstanceAuthStatus) bool

func IsNotFoundError

func IsNotFoundError(err error) bool

func IsSucceeded

func IsSucceeded(status *schema.BundleInstanceAuthStatus) bool

func IsUnused

func IsUnused(status *schema.BundleInstanceAuthStatus) bool

Types

type Auth

type Auth interface {
	ToCredentials() *Credentials
}

type AuthDetails

type AuthDetails struct {
	RequestParameters *RequestParameters `json:"request_parameters,omitempty"`
	CSRFConfig        *CSRFConfig        `json:"csrf_config,omitempty"`
	Credentials       Auth               `json:"auth,omitempty"`
}

type AuthType

type AuthType string

AuthType determines the secret structure

const (
	Undefined   AuthType = ""
	NoAuth      AuthType = "no_auth"
	Oauth       AuthType = "oauth"
	Basic       AuthType = "basic_auth"
	Certificate AuthType = "certificate"
)

type BasicAuth

type BasicAuth struct {
	// Username to use for authentication
	Username string
	// Password to use for authentication
	Password string
}

BasicAuth contains details of BasicAuth Auth configuration

type BasicAuthConfig

type BasicAuthConfig struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (BasicAuthConfig) ToCredentials

func (bc BasicAuthConfig) ToCredentials() *Credentials

type BindEndpoint

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

func NewBindEndpoint

func NewBindEndpoint(credentialsCreator types.BundleCredentialsCreateRequester, credentialsGetter types.BundleCredentialsFetcher) *BindEndpoint

func (*BindEndpoint) Bind

func (b *BindEndpoint) Bind(ctx context.Context, instanceID, bindingID string, details domain.BindDetails, asyncAllowed bool) (domain.Binding, error)

type BindLastOperationEndpoint

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

func NewBindLastOperationEndpoint

func NewBindLastOperationEndpoint(credentialsGetter types.BundleCredentialsFetcher) *BindLastOperationEndpoint

func (*BindLastOperationEndpoint) LastBindingOperation

func (b *BindLastOperationEndpoint) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error)

type BindingCredentials

type BindingCredentials struct {
	ID          string            `json:"id"`
	Type        AuthType          `json:"credentials_type"`
	TargetURLs  map[string]string `json:"target_urls"`
	AuthDetails AuthDetails       `json:"auth_details"`
}

type BrokerOperationType

type BrokerOperationType string
const (
	ProvisionOp   BrokerOperationType = "provision_operation"
	BindOp        BrokerOperationType = "bind_operation"
	UnbindOp      BrokerOperationType = "unbind_operation"
	DeprovisionOp BrokerOperationType = "deprovision_operation"
)

type CSRFConfig

type CSRFConfig struct {
	TokenURL string `json:"token_url"`
}

type CatalogConverter

type CatalogConverter struct {
	ORDServiceURL string
}

func (CatalogConverter) Convert

type CatalogEndpoint

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

func (*CatalogEndpoint) Services

func (b *CatalogEndpoint) Services(ctx context.Context) ([]domain.Service, error)

type CertificateConfig

type CertificateConfig struct {
	Certificate []byte `json:"certificate"`
	PrivateKey  []byte `json:"privateKey"`
}

func (CertificateConfig) ToCredentials

func (cc CertificateConfig) ToCredentials() *Credentials

type CertificateGen

type CertificateGen struct {
	// CommonName of the certificate
	// Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets
	// It should be removed when it is no longer supported
	CommonName string
	// Certificate generated by Application Registry
	Certificate []byte
	// PrivateKey generated by Application Registry
	PrivateKey []byte
}

CertificateGen details of CertificateGen configuration

type Converter

type Converter interface {
	Convert(app *schema.ApplicationExt) (*domain.Service, error)
}

type Credentials

type Credentials struct {
	// OAuth is OAuth configuration.
	OAuth *OAuth
	// BasicAuth is BasicAuth configuration.
	BasicAuth *BasicAuth
	// CertificateGen is CertificateGen configuration.
	CertificateGen *CertificateGen
	// CSRFTokenEndpointURL (optional) to fetch CSRF token
	// Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets. It is not used by authorization package.
	// It should be removed when it is no longer supported
	CSRFTokenEndpointURL string
}

Credentials contains OAuth or BasicAuth configuration.

type DeprovisionEndpoint

type DeprovisionEndpoint struct {
}

func NewDeprovisionEndpoint

func NewDeprovisionEndpoint() *DeprovisionEndpoint

func (*DeprovisionEndpoint) Deprovision

func (b *DeprovisionEndpoint) Deprovision(ctx context.Context, instanceID string, details domain.DeprovisionDetails, asyncAllowed bool) (domain.DeprovisionServiceSpec, error)

type GetBindingEndpoint

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

func NewGetBindingEndpoint

func NewGetBindingEndpoint(credentialsGetter types.BundleCredentialsFetcherForInstance) *GetBindingEndpoint

func (*GetBindingEndpoint) GetBinding

func (b *GetBindingEndpoint) GetBinding(ctx context.Context, instanceID, bindingID string) (domain.GetBindingSpec, error)

type GetInstanceEndpoint

type GetInstanceEndpoint struct {
}

func NewGetInstanceEndpoint

func NewGetInstanceEndpoint() *GetInstanceEndpoint

func (*GetInstanceEndpoint) GetInstance

func (b *GetInstanceEndpoint) GetInstance(ctx context.Context, instanceID string) (domain.GetInstanceDetailsSpec, error)

type InstanceLastOperationEndpoint

type InstanceLastOperationEndpoint struct {
}

func NewInstanceLastOperationEndpoint

func NewInstanceLastOperationEndpoint() *InstanceLastOperationEndpoint

func (*InstanceLastOperationEndpoint) LastOperation

func (b *InstanceLastOperationEndpoint) LastOperation(ctx context.Context, instanceID string, details domain.PollDetails) (domain.LastOperation, error)

type NoAuthConfig

type NoAuthConfig struct{}

func (NoAuthConfig) ToCredentials

func (oc NoAuthConfig) ToCredentials() *Credentials

type OAuth

type OAuth struct {
	// URL to OAuth token provider.
	URL string
	// ClientID to use for
	ClientID string
	// ClientSecret to use for
	ClientSecret string
	// RequestParameters will be used with request send by the Application Gateway.
	RequestParameters *RequestParameters
}

OAuth contains details of OAuth configuration

type OauthConfig

type OauthConfig struct {
	ClientId          string            `json:"clientId"`
	ClientSecret      string            `json:"clientSecret"`
	TokenURL          string            `json:"tokenUrl"`
	RequestParameters RequestParameters `json:"requestParameters,omitempty"`
}

func (OauthConfig) ToCredentials

func (oc OauthConfig) ToCredentials() *Credentials

type ProvisionEndpoint

type ProvisionEndpoint struct {
}

func NewProvisionEndpoint

func NewProvisionEndpoint() *ProvisionEndpoint

func (*ProvisionEndpoint) Provision

func (b *ProvisionEndpoint) Provision(ctx context.Context, instanceID string, details domain.ProvisionDetails, asyncAllowed bool) (domain.ProvisionedServiceSpec, error)

type RequestParameters

type RequestParameters struct {
	Headers         *map[string][]string `json:"headers,omitempty"`
	QueryParameters *map[string][]string `json:"query_parameters,omitempty"`
}

RequestParameters contains Headers and QueryParameters

type UnbindEndpoint

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

func NewUnbindEndpoint

func NewUnbindEndpoint(credentialsGetter types.BundleCredentialsFetcher, credentialsDeleter types.BundleCredentialsDeleteRequester) *UnbindEndpoint

func (*UnbindEndpoint) Unbind

func (b *UnbindEndpoint) Unbind(ctx context.Context, instanceID, bindingID string, details domain.UnbindDetails, asyncAllowed bool) (domain.UnbindSpec, error)

type UpdateInstanceEndpoint

type UpdateInstanceEndpoint struct {
}

func NewUpdateInstanceEndpoint

func NewUpdateInstanceEndpoint() *UpdateInstanceEndpoint

func (*UpdateInstanceEndpoint) Update

func (b *UpdateInstanceEndpoint) Update(ctx context.Context, instanceID string, details domain.UpdateDetails, asyncAllowed bool) (domain.UpdateServiceSpec, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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