Commit 69bf5183 authored by Guillermo Sanz López's avatar Guillermo Sanz López
Browse files

change vault token

parent d505da26
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ private_key = dump_privatekey(FILETYPE_PEM, key)
# Get ca.cert from vault
config = Config().get_config() # get configuration from config.py
url = 'http://{}:{}/v1/secret/data/ca'.format(os.getenv('VAULT_HOSTNAME'), os.getenv('VAULT_PORT'))   # http://vault:8200/v1/secret/data/ca
headers = {'X-Vault-Token': config['ca_factory']['token']}
headers = {'X-Vault-Token': os.getenv('VAULT_TOKEN')}
response = requests.request("GET", url, headers=headers, verify = False)
ca_cert = json.loads(response.text)["data"]["data"]["ca"]
# print ("CA CERT URL: ", url)
@@ -70,7 +70,7 @@ ca_cert = json.loads(response.text)["data"]["data"]["ca"]
# Request Vault a CA certificate to backoffice application
url = 'http://{}:{}/v1/pki_int/sign/my-ca'.format(os.getenv('VAULT_HOSTNAME'), os.getenv('VAULT_PORT'))  # http://vault:8200/v1/pki_int/sign/my-ca

headers = {'X-Vault-Token': config['ca_factory']['token']}  # token = dev-only-token
headers = {'X-Vault-Token': os.getenv('VAULT_TOKEN')}  # token = dev-only-token
data = {
    'format':'pem_bundle',
    'ttl': '43000h',
+1 −1
Original line number Diff line number Diff line
@@ -27,5 +27,5 @@ capif: {
ca_factory: {
  "url": "vault",
  "port": "8200",
  "token": "hvs.RtA1gaDmiwWPyZ6Q0YyPjwZw"
  "token": "dev-only-token"
}