Documentation
¶
Overview ¶
Package dirad implements an Active Directory agent
Index ¶
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) Configure(ctx context.Context, req diragentapi.DirAgentConfigureRequest) (*diragentapi.DirAgentConfigureResponse, error)
- func (p *Provider) GetAccount(ctx context.Context, req diragentapi.DirAgentGetAccountRequest) (*diragentapi.DirAgentGetAccountResponse, error)
- func (p *Provider) ListAccounts(ctx context.Context, req diragentapi.DirAgentListAccountsRequest) (*diragentapi.DirAgentListAccountsResponse, error)
- func (p *Provider) ListGroups(ctx context.Context, req diragentapi.DirAgentListGroupsRequest) (*diragentapi.DirAgentListGroupsResponse, error)
- func (p *Provider) PerformOperation(ctx context.Context, req diragentapi.DirAgentPerformOperationRequest) (*diragentapi.DirAgentPerformOperationResponse, error)
- func (p *Provider) VerifyAccounts(ctx context.Context, req diragentapi.DirAgentVerifyAccountsRequest) (*diragentapi.DirAgentVerifyAccountsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// Scope restricts account synchronization to the configured directory
// subtrees. An empty scope means the whole domain.
Scope adclient.Scope
// GroupScope restricts which groups are listed, stored as memberships, and
// enforced by recovery policy. An empty scope means the whole local domain.
//
// Account and group scopes are separate because accounts and groups commonly
// live in different containers. Memberships outside GroupScope are ignored;
// in-scope memberships must resolve completely for live recovery decisions.
GroupScope adclient.Scope
// DomainController names the controller used for consistency-sensitive
// directory reads: account enumeration and verification, group listing, live
// account lookup, and the eligibility check before a recovery operation. Empty
// means the agent discovers one.
//
// A configured controller is a constraint; a discovered one is refreshed after
// dcTTL. Recovery reads and writes leave -Server unset so AD can select a
// writable controller, and the Configure-time domain and search-base checks
// use the module's default controller rather than this one.
DomainController string
// AllowPrivilegedAccounts permits recovery of accounts with nonzero
// adminCount. It is false by default.
AllowPrivilegedAccounts bool
// contains filtered or unexported fields
}
Provider represents the directory provider
func (*Provider) Configure ¶
func (p *Provider) Configure(ctx context.Context, req diragentapi.DirAgentConfigureRequest) (*diragentapi.DirAgentConfigureResponse, error)
Configure returns static information about the integration
func (*Provider) GetAccount ¶
func (p *Provider) GetAccount(ctx context.Context, req diragentapi.DirAgentGetAccountRequest) (*diragentapi.DirAgentGetAccountResponse, error)
GetAccount looks up eligible accounts by immutable ID or external ID. An external ID may match multiple accounts.
func (*Provider) ListAccounts ¶
func (p *Provider) ListAccounts(ctx context.Context, req diragentapi.DirAgentListAccountsRequest) (*diragentapi.DirAgentListAccountsResponse, error)
ListAccounts returns a partial list of accounts. Callers should use Cursor to page through multiple pages of results.
func (*Provider) ListGroups ¶
func (p *Provider) ListGroups(ctx context.Context, req diragentapi.DirAgentListGroupsRequest) (*diragentapi.DirAgentListGroupsResponse, error)
ListGroups returns the directory groups that match the given name prefix.
func (*Provider) PerformOperation ¶
func (p *Provider) PerformOperation(ctx context.Context, req diragentapi.DirAgentPerformOperationRequest) (*diragentapi.DirAgentPerformOperationResponse, error)
PerformOperation performs the specified recovery operation
func (*Provider) VerifyAccounts ¶ added in v0.1.28
func (p *Provider) VerifyAccounts(ctx context.Context, req diragentapi.DirAgentVerifyAccountsRequest) (*diragentapi.DirAgentVerifyAccountsResponse, error)
VerifyAccounts reports whether accounts the server already holds still exist and are still eligible.
The server calls this immediately before removing accounts a full enumeration did not return. Enumeration pages on a mutable sequence number, so an account written before its range was scanned can escape the walk - and "the walk did not return it" is exactly what the server would otherwise delete on.