(cli): Define a plugin contract #32099
Labels
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
package/tools
Related to AWS CDK Tools or CLI
Describe the feature
Currently, there is an implicit contract between the CLI and authentication plugins. Plugin authors are supposed to write the main plugin logic in an implementation of the
CredentialProviderSource
interface. The module exported by the plugin should have aninit()
function that takes in an instance ofPluginHost
(implemented and provided at runtime by the CLI).PluginHost
can be used to register one or moreCredentialProviderSource
s. In addition, thegetProvider()
method inCredentialProviderSource
receives the mode (ForReading
orForWriting
) under which the CLI is operating for that particular call.However, none of these types are guaranteed to be exposed, and there is no documentation on how they should be used. Make this contract explicit by exposing publicly documented types.
Use Case
Developers who want to write authentication plugins for the CDK need to have a clear understanding of how their code would interact with the CLI.
Proposed Solution
Create a new package, that exposes these types.
Other Information
No response
Acknowledgements
CDK version used
2.166.0
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: