Skip to main content

Module hostauth

Module hostauth 

Source
Expand description

host.auth.* and host.affinity.lookup callbacks (internal/pluginhost/ auth_callbacks.go, affinity_callbacks.go): plugins read and save credentials and observe session affinity through the host’s auth manager.

The server provides the manager (AuthManager, Go’s coreauth.Manager as the plugin host uses it); without one, listing reads the auth directory and lookups report the manager unavailable, as Go’s host does before SetAuthManager.

Structs§

HostAuth
A credential as the manager holds it (the Go coreauth.Auth fields the plugin host reads).
RpcHostAuthGetRequest
RpcHostAuthGetResponse
RpcHostAuthListResponse
SavedRefresh
Where a saved plugin auth’s refresh deadlines come from (Go preserveExistingAuthState in buildAuthsFromFileData): the registered auth it replaces (donor, Go findExistingAuthForSave), whose LastRefreshedAt and NextRefreshAfter it takes, unset ones included; without one, the NextRefreshAfter its plugin parsed (the credential’s own). The manager applies them only once it registers the auth.

Enums§

SavedAuths
What host.auth.save registers for the file it writes (Go buildAuthsFromFileData).

Traits§

AuthManager
The server’s credential manager as the plugin host uses it.

Functions§

build_entry
Go buildHostAuthFileEntry. None hides the credential: a disabled runtime-only one, one without a file that is not runtime-only, or a disabled or removed one whose file is gone.
write_auth_file
os.WriteFile(path, data, 0o600): the error is Go’s *PathError text for the step that failed (open, write, then close).