keystone

package
v0.0.0-...-d6856c1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 16 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LocalAuthPath = "/keystone/v3"
)

Keystone constants.

Variables

This section is empty.

Functions

func WithXClusterID

func WithXClusterID(ctx context.Context, clusterID string) context.Context

WithXClusterID creates child context with cluster ID

Types

type ConfigDomain

type ConfigDomain struct {
	UUID string `json:"uuid,omitempty"`
	Name string `json:"name,omitempty"`
}

ConfigDomain represents domain object.

type ConfigProject

type ConfigProject struct {
	UUID   string   `json:"uuid,omitempty"`
	Name   string   `json:"name,omitempty"`
	FQName []string `json:"fq_name,omitempty"`
}

ConfigProject represents project object.

type InMemoryStore

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

InMemoryStore is an implementation of Store based on in-memory synced map.

func MakeInMemoryStore

func MakeInMemoryStore(expire time.Duration) *InMemoryStore

MakeInMemoryStore is used to make a in memory store.

func (*InMemoryStore) CreateToken

func (store *InMemoryStore) CreateToken(user *keystone.User, project *keystone.Project) (string, *keystone.Token)

CreateToken is used to create a token for a user. This method also persists a token.

func (*InMemoryStore) RetrieveToken

func (store *InMemoryStore) RetrieveToken(tokenID string) (*keystone.Token, error)

RetrieveToken is used to retrieve a token, and return a token body.

func (*InMemoryStore) ValidateToken

func (store *InMemoryStore) ValidateToken(tokenID string) (*keystone.Token, bool)

ValidateToken is used to validate a token, and return a token body.

type Keystone

type Keystone struct {
	Assignment *asfkeystone.StaticAssignment
	// contains filtered or unexported fields
}

Keystone is used to represents Keystone Controller.

func Init

func Init() (*Keystone, error)

Init is used to initialize echo with Keystone capability. This function reads config from viper.

func (*Keystone) CreateTokenAPI

func (k *Keystone) CreateTokenAPI(c echo.Context) error

CreateTokenAPI is an API handler for issuing new authentication token.

func (*Keystone) GetProjectAPI

func (k *Keystone) GetProjectAPI(c echo.Context) error

GetProjectAPI is an API handler to list projects.

func (*Keystone) ListAuthProjectsAPI

func (k *Keystone) ListAuthProjectsAPI(c echo.Context) error

ListAuthProjectsAPI is an API handler to list projects available to be scoped to based on the token.

func (*Keystone) ListProjectsAPI

func (k *Keystone) ListProjectsAPI(c echo.Context) error

ListProjectsAPI is an API handler to list projects.

func (*Keystone) ListUsersAPI

func (k *Keystone) ListUsersAPI(c echo.Context) error

ListUsersAPI is an API handler to list users.

func (*Keystone) RegisterGRPCAPI

func (*Keystone) RegisterGRPCAPI(r apiserver.GRPCRouter)

RegisterGRPCAPI does nothing, as Keystone has no GRPC API.

func (*Keystone) RegisterHTTPAPI

func (k *Keystone) RegisterHTTPAPI(r apiserver.HTTPRouter)

RegisterHTTPAPI registers local Keystone endpoints.

func (*Keystone) ValidateTokenAPI

func (k *Keystone) ValidateTokenAPI(c echo.Context) error

ValidateTokenAPI is an API token for validating Token.

type Store

type Store interface {
	CreateToken(*keystone.User, *keystone.Project) (string, *keystone.Token)
	ValidateToken(string) (*keystone.Token, bool)
	RetrieveToken(string) (*keystone.Token, error)
}

Store is used to provide a persistence layer for tokens.

type UserListResponse

type UserListResponse struct {
	Users []*keystone.User `json:"users"`
}

UserListResponse represents a user list response.

type VncDomain

type VncDomain struct {
	Domain *ConfigDomain `json:"domain"`
}

VncDomain represents a vnc config domain object.

type VncDomainListResponse

type VncDomainListResponse struct {
	Domains []*VncDomain `json:"domains"`
}

VncDomainListResponse represents a domain list response.

type VncProject

type VncProject struct {
	Project *ConfigProject `json:"project"`
}

VncProject represents a vnc config project object.

type VncProjectListResponse

type VncProjectListResponse struct {
	Projects []*VncProject `json:"projects"`
}

VncProjectListResponse represents a project list response.

Jump to

Keyboard shortcuts

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