Skip to content

Commit

Permalink
Converting the AuthSecret field to a union AuthInfo type
Browse files Browse the repository at this point in the history
This change will enable operators to chose different auth schemes for
brokers, as the OSB API spec begins to support more in the future.

Fixes kubernetes-retired#864
  • Loading branch information
arschles committed May 22, 2017
1 parent c3b84ae commit dfb19ab
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pkg/apis/servicecatalog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,21 @@ type BrokerSpec struct {
// URL is the address used to communicate with the Broker.
URL string

// AuthSecret is a reference to a Secret containing auth information the
// catalog should use to authenticate to this Broker.
AuthSecret *v1.ObjectReference
// AuthInfo contains the data that the service catalog should use to authenticate
// with the Broker
AuthInfo BrokerAuthInfo
}

// BrokerAuthInfo is a union type that contains information on one of the authentication methods
// the the service catalog and brokers may support, according to the OpenServiceBroker API
// specification (https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md).
//
// Note that we currently restrict a single broker to have only one of these fields
// set on it.
type BrokerAuthInfo struct {
// BasicAuthSecret is a reference to a Secret containing auth information the
// catalog should use to authenticate to this Broker using basic auth.
BasicAuthSecret v1.ObjectReference
}

// BrokerStatus represents the current status of a Broker.
Expand Down

0 comments on commit dfb19ab

Please sign in to comment.