#Heading 1
##Heading 2
###Heading 3
####Heading 4
#####Heading 5
| resource "vault_mount" "ldap" { | |
| path = "ldap" | |
| type = "openldap" | |
| description = "LDAP Secret Engine" | |
| } | |
| resource "vault_generic_endpoint" "openldapconfig" { | |
| depends_on = [vault_mount.ldap] | |
| path = "${vault_mount.ldap.path}/config" | 
| Executing the command below will bring a list of entities , their auth method and their id: | |
| Export VAULT_ADDR=https://<Vault_address>:8200 | |
| export VAULT_TOKEN=<Vault_token> | |
| export VAULT_NAMESPACE=<Vault_namespace> | 
| ################################################ start ################################################# | |
| ############################### | |
| export VAULT_ADDR=https://vault.hashidemos.io:8200 | |
| export VAULT_TOKEN=s.evX | |
| # Set up the PKI Secret Engine | |
| ############################### | |
| ## Root CA Mount | 
| import hudson.util.Secret | |
| import com.datapipe.jenkins.vault.credentials.* | |
| import com.cloudbees.plugins.credentials.impl.* | |
| import com.cloudbees.plugins.credentials.* | |
| import com.cloudbees.plugins.credentials.domains.* | |
|  | |
|  | |
| VaultAppRoleCredential customCredential = new VaultAppRoleCredential( | |
| CredentialsScope.GLOBAL, | |
| 'custom-credential', | 
| global: | |
| # enabled is the master enabled switch. Setting this to true or false | |
| # will enable or disable all the components within this chart by default. | |
| enabled: true | |
| # TLS for end-to-end encrypted transport | |
| tlsDisable: true | |
| # If deploying to OpenShift | |
| psp: | |
| enable: false | 
| variable "vault_host" { | |
| description = "Vault hostname" | |
| default = "vault.ric-lnd-stack.ric.aws.hashidemos.io" | |
| } | |
| terraform { | |
| backend "remote" { | |
| organization = "hc-emea-sentinel-demo" | |
| workspaces { | |
| name = "vault-integration" | |
| } | 
#Heading 1
##Heading 2
###Heading 3
####Heading 4
#####Heading 5
| Steps to make a Control Group Notifier | |
| 1) list all Tokens | |
| curl -X LIST \ | |
| http://eu-guystack-vault-561637873.eu-west-2.elb.amazonaws.com:8200/v1/auth/token/accessors \ | |
| -H 'Accept: */*' \ | |
| -H 'Accept-Encoding: gzip, deflate' \ | |
| -H 'Cache-Control: no-cache' \ | |
| -H 'Connection: keep-alive' \ | 
| - | |
| hosts: localhost | |
| gather_facts: false | |
| vars: | |
| secret_token: '${option.vault_token}' | |
| role_id: '${option.approle_id}' | |
| tasks: | |
| - | |
| name: 'Get secret id from role_id' | |
| uri: {url: 'http://active.vault.service.consul:8200/v1/auth/approle/role/my-role/secret-id', method: POST, headers: {X-Vault-Token: '{{ secret_token }}'}, body_format: json, status_code: 200} | 
| { | |
| "variables": { | |
| "version": "", | |
| "memory" : "8196", | |
| "cpucorecount": "4" | |
| }, | |
| "provisioners": [ | |
| { | |
| "type": "file", | |
| "source": "bootcamp.rli", |