Documentation
¶
Overview ¶
Package exchangeclient is the GCS node plugin's side of the credential exchange. For each transfer it trades the actor JWT atelet handed it for a GCS access token scoped to that actor's snapshot prefixes, caches the token and the storage client built with it under that JWT, and hands the client to the transfer. It is this binary's: a provider's own plugin brings its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Address is the exchange's host and port, the ate-api-server Service.
Address string
// CAFile verifies the exchange's serving certificate.
CAFile string
// ServerName is the DNS name expected on that certificate.
ServerName string
}
Config is how the exchange is reached.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements objectstoreplugin.Credentials for GCS.
func (*Source) Client ¶
func (s *Source) Client(ctx context.Context, actorJWT string, force bool) (objectstorage.ObjectStorage, error)
Client returns a storage client scoped to the actor actorJWT names: the cached one for that JWT while its token has at least credential.MinServeLifetime left, otherwise one built on a fresh exchange, which replaces the cached one. force skips the cache, after GCS refused a request made with the cached token, and asks the exchange to skip its own. A refused or nearly expired entry is dropped before the exchange, so it is not served again if the exchange fails or returns a token too short to keep. An exchange error reaches the caller unchanged.