title: How to access Vault credentials in pipeline
body: <p>We use the Vault plugin in our pipeline to read credentials from Vault. Now we also want to generate TLS certificates with Vault's PKI engine. For that I need the appRole secret id for Jenkins in my pipeline file. The secret is configured in Jenkins as 'Vault App Role Credential' and I don't know how to access it.</p>
  
  <p>What I'd like to do is something like this:</p>
  
  <pre><code>withCredentials([VaultAppRoleCredential(credentialsId: 'vault_credentials'), roleIdVariable: 'roleId', secretIdVariable: 'secretId']) {
  stage('generate certificate') {
      // authenticate with credentials against Vault
      // ...
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My workaround at the moment is to duplicate the credentials and store the roleId and secretId additionally in a username+password credential in Jenkins.</p>