Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cli): Define a plugin contract #32099

Open
2 tasks
otaviomacedo opened this issue Nov 12, 2024 · 1 comment · May be fixed by #32111
Open
2 tasks

(cli): Define a plugin contract #32099

otaviomacedo opened this issue Nov 12, 2024 · 1 comment · May be fixed by #32111
Assignees
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

Comments

@otaviomacedo
Copy link
Contributor

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 an init() function that takes in an instance of PluginHost (implemented and provided at runtime by the CLI). PluginHost can be used to register one or more CredentialProviderSources. In addition, the getProvider() method in CredentialProviderSource receives the mode (ForReading or ForWriting) 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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.166.0

Environment details (OS name and version, etc.)

N/A

@otaviomacedo otaviomacedo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 12, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 12, 2024
@otaviomacedo otaviomacedo self-assigned this Nov 12, 2024
@khushail khushail added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Nov 12, 2024
@khushail
Copy link
Contributor

Opened by the core team. Marking as P2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants