An unofficial Vim plugin for Britive
Britive is a multi-cloud privilege & identity access management platform.
This is an unofficial vim plugin to provide a seamless integration with
pybritive
.
With vim-plug:
Plug 'https://github.com/pbnj/vim-britive'
Run Britive commands from vim.
:Britive <args...>
A basic example is checking out Britive Profiles:
:Britive checkout <APPLICATION>/<ENVIRONMENT>/<PROFILE>
Tab completion on :Britive
command completes Britive sub-commands,
like checkin
, checkout
, ...etc.
Since checking out Britive Profiles for programmatic access (i.e. generating API keys) are very common operations, there is a convenient command for it:
:BritiveCheckout <APPLICATION>/<ENVIRONMENT>/<PROFILE>
This is equivalent to checking out Programmatic Access via the Britive web UI.
Tab completion is supported on :BritiveCheckout
command, which completes
profile names.
You may pass any britive checkout
flags to this command. For example, if you
would like to check out programmatic access and display the API
keys/credentials in "environment variable" format:
:BritiveCheckout <APPLICATION>/<ENVIRONMENT>/<PROFILE> --mode=env
You may check out console access for Britive Profiles:
:BritiveConsole <APPLICATION>/<ENVIRONMENT>/<PROFILE>
This will produce a URL for the configured Cloud Service Provider, equivalent to checking out Console Access via the Britive web UI.
Tab completion is supported on :BritiveConsole
command, which completes
possible profile names.
To automatically open Britive console URLs without manually copying/pasting, on macOS:
:BritiveConsole <APPLICATION>/<ENVIRONMENT>/<PROFILE> | xargs open
On Linux/Ubuntu:
:BritiveConsole <APPLICATION>/<ENVIRONMENT>/<PROFILE> | xargs xdg-open
pybritive
exposes the api
subcommand to query Britive APIs beyond the
available commands.
For example, you may run an environment scan like so:
pybritive api scans.scan --application_id <app_id> --environment_id <env_id>
This plugin provides the vim command :BritiveAPI
with tab-completion
suggestions, which allows you to do the same in vim:
:BritiveAPI scans.scan --application_id <app_id> --environment_id <env_id>
The results will be displayed in a vim terminal buffer. This allows you to leverage the full capabilities and functionality of vim to query and interact with the data as you please.
- Windows OS testing
MIT