auth

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const SecretSuffix = "-owprops"

SecretSuffix is the suffix appended to the original configmap name

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Auth Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func FindAuthKey

func FindAuthKey(bmxNamespaces *BmxNamespacesResponse, org string, space string) (string, error)

FindAuthKey gets the key corresponding to the CF org and space

Types

type BmxNamespaceResponse

type BmxNamespaceResponse struct {
	Name string `json:"name"`
	UUID string `json:"uuid"`
	Key  string `json:"key"`
}

BmxNamespaceResponse is this...

type BmxNamespacesRequest

type BmxNamespacesRequest struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

BmxNamespacesRequest is this...

type BmxNamespacesResponse

type BmxNamespacesResponse struct {
	Subject    string                 `json:"subject"`
	Namespaces []BmxNamespaceResponse `json:"namespaces"`
}

BmxNamespacesResponse is this...

func AuthenticateUserWithWsk

func AuthenticateUserWithWsk(apiHost string, uaaTokenOnly string, uaaRefreshToken string, insecure bool) (*BmxNamespacesResponse, *http.Response, error)

AuthenticateUserWithWsk gets the OpenWhisk apikey associated to the given UUA token

type ReconcileAuth

type ReconcileAuth struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileAuth reconciles a Auth object

func (*ReconcileAuth) Reconcile

func (r *ReconcileAuth) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Auth object and makes changes based on the state read and what is in the Auth.Spec +kubebuilder:rbac:groups=,resources=configmaps,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=,resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=,resources=events,verbs=get;list;watch;create;update;patch;delete

type UAAConfig

type UAAConfig struct {
	Target       string
	AccessToken  string
	RefreshToken string
}

UAAConfig is a struct for parsing the Cloud Foundry config.json

Jump to

Keyboard shortcuts

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