css

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CSS_PRE_AUTHENTICATED_IDENTITY = "CSS_PRE_AUTHENTICATED_HEADER"

Set this env var to a value that will be used to identify the http header that contains the user identity, when this plugin is running behind something that is doing the authentication.

View Source
const HZN_EXCHANGE_CA_CERT = "HZN_EXCHANGE_CA_CERT"

The env var that holds the path to an SSL CA certificate that should be used when accessing the exchange API.

View Source
const HZN_EXCHANGE_URL = "HZN_EXCHANGE_URL"

The env var that holds the exchange API endpoint when this authenticator should use the exchange to do authentication.

Variables

This section is empty.

Functions

func AlreadyAuthenticatedIdentityHeader

func AlreadyAuthenticatedIdentityHeader() string

func ExchangeCACert

func ExchangeCACert() string

func ExchangeURL

func ExchangeURL() string

Types

type GetAgbotsResponse

type GetAgbotsResponse struct {
	Agbots    map[string]UserDefinition `json:"agbots"`
	LastIndex int                       `json:"lastIndex"`
}

type GetNodesResponse

type GetNodesResponse struct {
	Nodes     map[string]interface{} `json:"nodes"`
	LastIndex int                    `json:"lastIndex"`
}

type GetUsersResponse

type GetUsersResponse struct {
	Users     map[string]UserDefinition `json:"users"`
	LastIndex int                       `json:"lastIndex"`
}

type HorizonAuthenticate

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

HorizonAuthenticate is the Horizon plugin for authentication used by the Cloud sync service (CSS). This plugin can be used in environments where authentication is handled by something else in the network before the CSS or where the CSS itself is deployed with a public facing API and so this plugin utilizes the exchange to authenticate users.

func (*HorizonAuthenticate) Authenticate

func (auth *HorizonAuthenticate) Authenticate(request *http.Request) (int, string, string)

Returns authentication result code, the user's org and id.

func (*HorizonAuthenticate) KeyandSecretForURL

func (auth *HorizonAuthenticate) KeyandSecretForURL(url string) (string, string)

KeyandSecretForURL returns an app key and an app secret pair to be used by the ESS when communicating with the specified URL. This method is not needed in the CSS.

func (*HorizonAuthenticate) Start

func (auth *HorizonAuthenticate) Start()

Start initializes the HorizonAuthenticate plugin.

type UserDefinition

type UserDefinition struct {
	Password    string `json:"password"`
	Admin       bool   `json:"admin"`
	Email       string `json:"email"`
	LastUpdated string `json:"lastUpdated"`
}

Directories

Path Synopsis
cmd
cloud-sync-service
Package main Cloud Syncronization Service This is the main package of the cloud synchronization service schemes: http host: localhost basePath: / version: 0.0.1 consumes: - application/json produces: - application/json swagger:meta
Package main Cloud Syncronization Service This is the main package of the cloud synchronization service schemes: http host: localhost basePath: / version: 0.0.1 consumes: - application/json produces: - application/json swagger:meta

Jump to

Keyboard shortcuts

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