Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppIDConfig ¶
type AppIDConfig struct { // private fields should not be marshaled to json AppidURL string `json:"appidURL"` AppidAPIKey string `json:"-,"` ClusterInfo *ClusterInfo `json:"clusterInfo"` ClusterPolicies *ClusterPolicies `json:"clusterPolicies"` Port string `json:"port"` ClientCredentials *ClientCredentials `json:"clientCredentials"` }
AppIDConfig encapsulates REST server configuration parameters
func NewAppIDConfig ¶
func NewAppIDConfig() (*AppIDConfig, error)
NewAppIDConfig creates a configuration object
type AppidAdapter ¶
type AppidAdapter struct {
// contains filtered or unexported fields
}
AppidAdapter supports authorization template.
func (*AppidAdapter) Addr ¶
func (s *AppidAdapter) Addr() string
Addr returns the listening address of the server
func (*AppidAdapter) Close ¶
func (s *AppidAdapter) Close() error
Close gracefully shuts down the server; used for testing
func (*AppidAdapter) HandleAuthorization ¶
func (s *AppidAdapter) HandleAuthorization(ctx context.Context, r *authorization.HandleAuthorizationRequest) (*v1beta1.CheckResult, error)
HandleAuthorization handles web authentiation
func (*AppidAdapter) Run ¶
func (s *AppidAdapter) Run(shutdown chan error)
Run starts the server run
type ClientCredentials ¶
type ClientCredentials struct { TenantID string `json:"tenantId"` ClientID string `json:"clientId"` Secret string `json:"-,"` AuthorizationURL string `json:"authorizationUrl"` TokenURL string `json:"tokenUrl"` UserinfoURL string `json:"userinfoUrl"` JwksURL string `json:"jwksUrl"` }
ClientCredentials encapsulates App ID instance credentials
type ClusterInfo ¶
type ClusterInfo struct { Name string `json:"name"` GUID string `json:"guid"` Type string `json:"type"` Location string `json:"location"` Services map[string]Service `json:"services,string"` }
ClusterInfo encapsulates the Kubernetes cluster information to be sent to App ID
type ClusterPolicies ¶
ClusterPolicies encapsulates the policies retrieved from App ID
type JWTTokenParser ¶
type JWTTokenParser interface { Parse(pubkeys map[string]crypto.PublicKey, token string) (*jwt.Token, error) Validate(pubkeys map[string]crypto.PublicKey, token string, tenantID string) error }
JWTTokenParser parses and validates JWT tokens
type Monitor ¶
type Monitor interface { Start() Stop() error }
Monitor tracks kubernetes data with App ID
func NewMonitor ¶
func NewMonitor(cfg *AppIDConfig) (Monitor, error)
NewMonitor creates an App ID Monitor object
type PublicKeyUtil ¶
type PublicKeyUtil interface { RetrievePublicKeys() error GetPublicKeys() map[string]crypto.PublicKey }
PublicKeyUtil retries public keys from OAuth server
func NewPublicKeyUtil ¶
func NewPublicKeyUtil(publicKeyURL string) PublicKeyUtil
NewPublicKeyUtil Create a new Public Key Util
type Server ¶
Server is basic server interface
func NewAppIDAdapter ¶
func NewAppIDAdapter(cfg *AppIDConfig) (Server, error)
NewAppIDAdapter creates a new AppID Adapter that listens at provided port.