From 53301728fa9e052214f7c2f8211a693ff5313ac9 Mon Sep 17 00:00:00 2001 From: alwaysjolley Date: Tue, 26 Feb 2019 09:15:12 -0500 Subject: [PATCH] Moved url to config file instead of plugin option. One one url can be supported unless both the token and url are moved to the plugin options. --- lemur/plugins/lemur_vault/plugin.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lemur/plugins/lemur_vault/plugin.py b/lemur/plugins/lemur_vault/plugin.py index 58a9e601..2e46b155 100644 --- a/lemur/plugins/lemur_vault/plugin.py +++ b/lemur/plugins/lemur_vault/plugin.py @@ -47,11 +47,11 @@ class VaultDestinationPlugin(DestinationPlugin): 'helpMessage': 'Must be a valid Vault secrets path' }, { - 'name': 'vaultUrl', + 'name': 'objectName', 'type': 'str', - 'required': True, - 'validation': '^https?://[a-zA-Z0-9.-]+(?::[0-9]+)?$', - 'helpMessage': 'Must be a valid Vault server url' + 'required': False, + 'validation': '[0-9a-zA-Z:_-]+', + 'helpMessage': 'Name to bundle certs under, if blank use cn' }, { 'name': 'bundleChain', @@ -64,13 +64,6 @@ class VaultDestinationPlugin(DestinationPlugin): ], 'required': True, 'helpMessage': 'Bundle the chain into the certificate' - }, - { - 'name': 'objectName', - 'type': 'str', - 'required': False, - 'validation': '[0-9a-zA-Z:_-]+', - 'helpMessage': 'Name to bundle certs under, if blank use cn' } ] @@ -93,10 +86,10 @@ class VaultDestinationPlugin(DestinationPlugin): sans_name = '{0}.san'.format(cname) token = current_app.config.get('VAULT_TOKEN') + url = current_app.config.get('VAULT_URL') mount = self.get_option('vaultMount', options) path = self.get_option('vaultPath', options) - url = self.get_option('vaultUrl', options) bundle = self.get_option('bundleChain', options) obj_name = self.get_option('objectName', options)