Documentation
¶
Index ¶
- type Client
- func (c *Client) AddGrantToRole(ctx context.Context, roleID string, targetID string) error
- func (c *Client) AddHostSetToTarget(ctx context.Context, targetID string, hostSetID string) error
- func (c *Client) AddHostsToSet(ctx context.Context, hostSetID string, hostIDs ...string) error
- func (c *Client) AddPrincipalToRole(ctx context.Context, roleID string, principalID string) error
- func (c *Client) ConnectSSH(ctx context.Context, targetID, username, hostAlias string) error
- func (c *Client) CreateRole(ctx context.Context, scopeID string, name string) (Role, error)
- func (c *Client) CreateSSHBundle(ctx context.Context, req CreateSSHBundleRequest) (*CreatedSSHBundle, error)
- func (c *Client) CreateStaticHost(ctx context.Context, catalogID string, name string, address string) (Host, error)
- func (c *Client) CreateStaticHostCatalog(ctx context.Context, scopeID string, name string) (HostCatalog, error)
- func (c *Client) CreateStaticHostSet(ctx context.Context, catalogID string, name string) (HostSet, error)
- func (c *Client) CreateTCPTarget(ctx context.Context, scopeID string, name string, port int) (Target, error)
- func (c *Client) InspectTarget(ctx context.Context, targetID string) (*TargetInspection, error)
- func (c *Client) ListScopes(ctx context.Context) ([]Scope, error)
- func (c *Client) ListTargets(ctx context.Context, scopeID string) ([]Target, error)
- func (c *Client) StartOIDCAuth(ctx context.Context, authMethodID string) (*OIDCAuthStart, error)
- func (c *Client) WaitForOIDCToken(ctx context.Context, authMethodID string, tokenID string) (string, error)
- type CreateSSHBundleRequest
- type CreatedSSHBundle
- type Host
- type HostCatalog
- type HostSet
- type OIDCAuthStart
- type Role
- type Scope
- type Target
- type TargetHostSourceDetails
- type TargetInspection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a small SDK-backed Boundary client for bndry workflows.
func (*Client) AddGrantToRole ¶
AddGrantToRole grants authorize-session on the target.
func (*Client) AddHostSetToTarget ¶
AddHostSetToTarget attaches a host set to a target.
func (*Client) AddHostsToSet ¶
AddHostsToSet attaches one or more hosts to a host set.
func (*Client) AddPrincipalToRole ¶
AddPrincipalToRole adds a user or managed group principal to a role.
func (*Client) ConnectSSH ¶
ConnectSSH starts an interactive SSH session using a target ID.
func (*Client) CreateRole ¶
CreateRole creates a role in the supplied scope.
func (*Client) CreateSSHBundle ¶
func (c *Client) CreateSSHBundle(ctx context.Context, req CreateSSHBundleRequest) (*CreatedSSHBundle, error)
CreateSSHBundle performs the full host -> host set -> target -> role workflow.
func (*Client) CreateStaticHost ¶
func (c *Client) CreateStaticHost(ctx context.Context, catalogID string, name string, address string) (Host, error)
CreateStaticHost creates a host in a static catalog.
func (*Client) CreateStaticHostCatalog ¶
func (c *Client) CreateStaticHostCatalog(ctx context.Context, scopeID string, name string) (HostCatalog, error)
CreateStaticHostCatalog creates a static host catalog.
func (*Client) CreateStaticHostSet ¶
func (c *Client) CreateStaticHostSet(ctx context.Context, catalogID string, name string) (HostSet, error)
CreateStaticHostSet creates a static host set.
func (*Client) CreateTCPTarget ¶
func (c *Client) CreateTCPTarget(ctx context.Context, scopeID string, name string, port int) (Target, error)
CreateTCPTarget creates a TCP target, suitable for SSH.
func (*Client) InspectTarget ¶
InspectTarget returns the target plus resolved host sources, host sets, and hosts.
func (*Client) ListScopes ¶
ListScopes returns all scopes recursively from global.
func (*Client) ListTargets ¶
ListTargets lists targets for a scope.
func (*Client) StartOIDCAuth ¶
StartOIDCAuth starts an interactive OIDC authentication flow.
type CreateSSHBundleRequest ¶
type CreateSSHBundleRequest struct {
ScopeID string
CatalogName string
HostName string
HostAddress string
HostSetName string
TargetName string
Port int
CreateRole bool
RoleName string
PrincipalID string
}
CreateSSHBundleRequest contains the input for the guided SSH setup flow.
type CreatedSSHBundle ¶
type CreatedSSHBundle struct {
Catalog HostCatalog
Host Host
HostSet HostSet
Target Target
Role *Role
}
CreatedSSHBundle contains the resources created during setup.
type Host ¶
type Host struct {
ID string `json:"id"`
Name string `json:"name"`
Address string `json:"address"`
Type string `json:"type,omitempty"`
HostSetIDs []string `json:"host_set_ids,omitempty"`
IPAddresses []string `json:"ip_addresses,omitempty"`
DNSNames []string `json:"dns_names,omitempty"`
}
Host represents a static host entry.
type HostCatalog ¶
type HostCatalog struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
ScopeID string `json:"scope_id"`
}
HostCatalog represents a static host catalog.
type HostSet ¶
type HostSet struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
HostCatalogID string `json:"host_catalog_id,omitempty"`
HostIDs []string `json:"host_ids,omitempty"`
}
HostSet represents a static host set.
type OIDCAuthStart ¶
OIDCAuthStart contains the values needed to complete an OIDC login.
type Role ¶
type Role struct {
ID string `json:"id"`
Name string `json:"name"`
ScopeID string `json:"scope_id"`
}
Role represents a Boundary role.
type Scope ¶
type Scope struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
ParentScopeID string `json:"parent_scope_id"`
}
Scope represents a Boundary scope.
func FilterProjectScopes ¶
FilterProjectScopes returns only project scopes.
type Target ¶
type Target struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
ScopeID string `json:"scope_id"`
DefaultPort int `json:"default_port"`
Address string `json:"address,omitempty"`
HostSourceIDs []string `json:"host_source_ids,omitempty"`
}
Target represents a Boundary target.
func FindTargetByName ¶
FindTargetByName locates a target using an exact or case-insensitive name match.
func FindTargetsByName ¶
FindTargetsByName returns all exact matches, or case-insensitive matches when no exact match exists.
type TargetHostSourceDetails ¶
type TargetHostSourceDetails struct {
HostSet HostSet `json:"host_set"`
HostCatalog HostCatalog `json:"host_catalog"`
Hosts []Host `json:"hosts,omitempty"`
}
TargetHostSourceDetails describes one host set attached to a target.
type TargetInspection ¶
type TargetInspection struct {
Target Target `json:"target"`
HostSources []TargetHostSourceDetails `json:"host_sources,omitempty"`
}
TargetInspection contains the target plus its backing host source details.