12bit trade.
You are not logged in.
But what if you need to add new functionality or change how Conjur does something to better fit your needs.
how they work , and show you how you can get started with your own plugins.
When would I use a plugin.
Here are a few use cases where a plugin can be helpful.
1.
For example, the aws plugin allows you to create an AWS IAM role with permission to read a Conjur host factory token stored in S3.
2.
You want to abstract a common pattern into a higher-level workflow.
Let’s say you have a data analytics team in your organization that uses several third party services and needs to store their credentials in Conjur.
You want them to store the credentials in a uniform way: in a specific format with the correct roles granted access.
You can write a plugin for your analytics team that prompts them for the service, username and password.
The plugin would create the variable and grant the correct permissions to your groups and layers.
3.
The audit-send plugin is an example of this pattern.
It adds a send subcommand to the audit command that allows you to send custom audit events to Conjur.
4.
For example, you can enforce a namespacing scheme for variables in your organization by modifying conjur variable create command to suggest and enforce a namespace like division/product/service/api-key.
How do plugins work.
Conjur CLI plugins are implemented as Ruby gems.
They use the naming scheme conjur-asset-.
When you install a plugin, the gem is installed into the CLI package’s embedded Ruby and a marker is placed in your conjurrc file.
Any commands the plugin defines are then available the next time you run the CLI.
Here is an example – we will install the proxy plugin. It allows you to simply add Conjur authentication headers on outbound requests.
After installation, .
You can read more about how to use proxy here.
How do I write a Conjur plugin.
To write your own plugin, .
This gives you access to the api object, .
The client is authenticated as the user/host that is logged into the CLI.
Here is a simple example, an application of the first use case above, with Jenkins: Â Now you can launch builds in Jenkins, if your user has access to the jenkins/api-key variable.
We have released several plugins already that you can use as examples to work from.
Here are the ones we use most often internally.
audit-send – Send custom audit events host-factory – Bootstrap hosts into layers (read more) proxy – Simple HTTP proxy that adds Conjur authentication headers All of our plugins are open-source and hosted on Github.
Let us know what great plugins you create or use.
.
Offline