Secretless Plugin Interface Functional Overview
The Secretless Plugin Interface is the part of the Secretless SDK that defines what you must implement to create a new Secretless Connector Plugin. Secretless Connector Plugins enable you to connect to services that are not currently supported by the Secretless Broker.
A Secretless Connector Plugin is a Go shared library file (with .so
extensions) that implements two functions. The functions that the plugin implements depends on the type of plugin that you are creating, eithertcp.Plugin
or http.Plugin
.
|
or
|
Where tcp.Plugin
and http.Plugin
are defined as follows:
tcp.Plugin
|
http.Plugin
|
In both the tcp.Plugin
and http.Plugin
interfaces, the connector returned by NewConnector
is an interface that consists of one method, whose job is to transform an unauthenticated connection or request into an authenticated one.
At runtime, Secretless provides your plugin with access to a custom logging utility and any plugin-specific configuration with the connector.Resources interface
. The connector.Resources
interface is provided to your plugin’s constructor. To use it, retain a reference to connector.Resources
with a closure inside the Connector
function returned by your constructor. In addition, with each new connection request, Secretless provides the current credential values or secrets you need to authenticate.
Your plugin users specify the location of the secrets and any plugin-specific configuration in the secretless.yml
file, as described in Secretless Configuration.
For a detailed description of all methods and functions, refer to Secretless Plugin Interface SDK Reference.
See also
Create Secretless Connector Plugins
Build and Secure Secretless Connector Plugins
Test Secretless Connector Plugins