Documentation
¶
Overview ¶
Package authorizer gates access to the ephemeral virtual workspace.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( opts Options, checker ExportChecker, kubeClusterClient kcpkubernetesclientset.ClusterInterface, localExports, globalExports apisv1alpha2listers.APIExportClusterLister, bindings apisv1alpha2listers.APIBindingClusterLister, ) authorizer.Authorizer
New builds the authorizer guarding the ephemeral virtual workspace.
Types ¶
type ExportChecker ¶
type ExportChecker interface {
HasEntriesFor(export *apisv1alpha2.APIExport) bool
}
ExportChecker reports whether this virtual workspace serves anything for an APIExport.
type Options ¶
type Options struct {
// RequireExportContent makes the authorizer additionally verify that the
// requesting identity holds the `create` verb on the APIExport's
// `content` subresource in the export's own workspace, as the replication
// virtual workspace does.
//
// Whether this is correct depends on how the shard authenticates when it
// proxies a consumer's request: with a shard client certificate the
// identity the virtual workspace sees is the shard, not the end user.
// Verify against a real deployment before relying on it.
RequireExportContent bool
}
Options tune the content authorizer.
Click to show internal directories.
Click to hide internal directories.