Documentation ¶
Index ¶
- Constants
- func Factory(ctx context.Context, c *logical.BackendConfig) (logical.Backend, error)
- func NewHTTPClient() (*http.Client, error)
- func OHAuthPlugin(c *logical.BackendConfig) *ohAuthPlugin
- type Agbot
- type GetAgbotsResponse
- type GetUsersResponse
- type NotAuthenticatedError
- type OtherError
- type UserDefinition
Constants ¶
View Source
const ADMIN_ORG_WIDE_POLICY1 = `path "openhorizon/data/%s/*" {capabilities = ["create", "update", "read"]}`
Openhorizon org admins will have these ACL policies attached.
View Source
const ADMIN_ORG_WIDE_POLICY2 = `path "openhorizon/metadata/%s/*" {capabilities = ["list", "read", "delete"]}`
View Source
const ADMIN_POLICY_NAME = `openhorizon-%s-%s-admin`
View Source
const AGBOTID_RENEW_SECRET = "agbotid"
View Source
const AGBOTPW_RENEW_SECRET = "password"
View Source
const AGBOT_POLICY = `path "openhorizon/*" {capabilities = ["list","read"]}`
Openhorizon agbots will have these ACL policies attached.
View Source
const AGBOT_POLICY_NAME = `openhorizon-agbot`
Policy name formats
View Source
const AGBOT_RENEWAL_KEY = "agbot-renewal"
View Source
const AUTH_TOKEN_KEY = "token"
View Source
const AUTH_USER_KEY = "id"
View Source
const CONFIG_AGBOT_RENEWAL_KEY = "renewal"
View Source
const CONFIG_EXCHANGE_URL_KEY = "url"
View Source
const CONFIG_TOKEN_KEY = "token"
View Source
const CONFIG_VAULT_API_KEY = "apiurl"
View Source
const DEFAULT_APIURL = "http://localhost:8200"
View Source
const DEFAULT_RENEWAL_RATE = 300
View Source
const EXCHANGE_URL_STORAGE_KEY = "exchange-url"
View Source
const EX_MAX_RETRY = 5
TODO: Make these config options.
View Source
const EX_RETRY_INTERVAL = 2
View Source
const EX_ROOT_USER = "root"
The exchange root user id.
View Source
const HUB_CERT_PATH = "/openhorizon/certs/hub.crt"
View Source
const NON_ADMIN_ORG_WIDE_POLICY = `path "openhorizon/metadata/%s/*" {capabilities = ["list", "read"]}`
Regular openhorizon users will have these ACL policies attached. note: USER_PRIVATE_DENY_POLICY1 is also given to admins to prevent them from being able to read other user's private secrets
View Source
const USER_POLICY_NAME = `openhorizon-%s-%s`
View Source
const USER_PRIVATE_DENY_POLICY1 = `path "openhorizon/data/%s/user/*" {capabilities = ["deny"]}`
View Source
const USER_PRIVATE_DENY_POLICY2 = `path "openhorizon/metadata/%s/user/*" {capabilities = ["deny"]}`
View Source
const USER_PRIVATE_POLICY1 = `path "openhorizon/data/%s/user/%s/*" {capabilities = ["create", "update", "read"]}`
All supported openhorizon users will have these policies attached.
View Source
const USER_PRIVATE_POLICY2 = `path "openhorizon/metadata/%s/user/%s/*" {capabilities = ["list", "read", "delete"]}`
View Source
const VAULT_APIURL_STORAGE_KEY = "vault-url"
View Source
const VAULT_TOKEN_STORAGE_KEY = "agbot-vault-token"
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
Create an https connection, using a supplied SSL CA certificate.
func OHAuthPlugin ¶
func OHAuthPlugin(c *logical.BackendConfig) *ohAuthPlugin
Types ¶
type GetAgbotsResponse ¶
type GetUsersResponse ¶
type GetUsersResponse struct { Users map[string]UserDefinition `json:"users"` LastIndex int `json:"lastIndex"` }
type NotAuthenticatedError ¶
type NotAuthenticatedError struct {
Msg string
}
func (NotAuthenticatedError) Error ¶
func (e NotAuthenticatedError) Error() string
type OtherError ¶
type OtherError struct {
Msg string
}
func (OtherError) Error ¶
func (e OtherError) Error() string
Click to show internal directories.
Click to hide internal directories.