# Vault credential brokering with boundary

**URL:** <https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593>\
**Category:** Boundary\
**Created:** [May 17, 2022, 8:46am UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593 "2022-05-17T08:46:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhila98](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/akhila98/32/28107_2.png) [@akhila98](https://discuss.hashicorp.com/u/akhila98)\
**Post date:** [May 17, 2022, 8:46am UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593/1 "2022-05-17T08:46:36Z")

</div>

When I am trying to authorize a session using `boundary targets authorize-session` command. It results to following output.

Credentials:  
Credential Store ID: csvlt\_hkWBaLx2dc  
Credential Source ID: clvlt\_iSFVerk2Qs  
Credential Source Type: vault  
Credential Source Name: ec2  
Secret:  
null

So, my question is why does the secret part appears to be null , since I had provided the username n password in vault secret , that I had created manually

---

<div class="post-metadata">

**Author:** ![omkensey](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/omkensey/32/40882_2.png) [@omkensey](https://discuss.hashicorp.com/u/omkensey)\
**Post date:** [May 17, 2022, 1:28pm UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593/2 "2022-05-17T13:28:45Z")

</div>

What does your Vault credential store and credential library configuration look like? What’s the vault secret type and how do you have it formatted in Vault?

---

<div class="post-metadata">

**Author:** ![akhila98](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/akhila98/32/28107_2.png) [@akhila98](https://discuss.hashicorp.com/u/akhila98)\
**Post date:** [May 18, 2022, 5:38am UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593/3 "2022-05-18T05:38:22Z")

</div>

This is the vault credential store and credential library configuration.  
Credential Store information:  
Created Time: Wed, 18 May 2022 10:48:01 IST  
ID: csvlt\_4lWBv8Wke7  
Name: ec2-user  
Type: vault  
Updated Time: Wed, 18 May 2022 10:48:01 IST  
Version: 1

Scope:  
ID: p\_1234567890  
Name: Generated project scope  
Parent Scope ID: o\_1234567890  
Type: project

Authorized Actions:  
no-op  
read  
update  
delete

Authorized Actions on Credential Store’s Collections:  
credential-libraries:  
create  
list

Attributes:  
Address: [https://XXXXXXXXXXXX.com](https://XXXXXXXXXXXX.com)  
Token HMAC: R4a1iSMvHk06S6a0be-tnOlw8vAZtpZV9dxXvMtC40Q

Credential Library information:  
Created Time: Wed, 18 May 2022 10:57:58 IST  
Credential Store ID: csvlt\_4lWBv8Wke7  
ID: clvlt\_BMMtIfDIr8  
Name: ec2  
Type: vault  
Updated Time: Wed, 18 May 2022 10:57:58 IST  
Version: 1

Scope:  
ID: p\_1234567890  
Name: Generated project scope  
Parent Scope ID: o\_1234567890  
Type: project

Authorized Actions:  
no-op  
read  
update  
delete

Attributes:  
HTTP Method: GET  
Path: secret/ec2

Had created vault secret from the GUI console inside the secrets providing the username and password

---

<div class="post-metadata">

**Author:** ![omkensey](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/omkensey/32/40882_2.png) [@omkensey](https://discuss.hashicorp.com/u/omkensey)\
**Post date:** [May 19, 2022, 12:11am UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593/4 "2022-05-19T00:11:47Z")

</div>

Is that the default K/V v2 secret mount in a dev instance of Vault? If so, try creating a K/V v1 secret mount and storing the username/password in a secret there and using that as your credential endpoint.

---

<div class="post-metadata">

**Author:** ![akhila98](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/akhila98/32/28107_2.png) [@akhila98](https://discuss.hashicorp.com/u/akhila98)\
**Post date:** [May 20, 2022, 6:06am UTC](https://discuss.hashicorp.com/t/vault-credential-brokering-with-boundary/39593/5 "2022-05-20T06:06:38Z")

</div>

Integrating vault with boundary credential store , inorder to login into aws ec2 instance,  
but have to statically provide the credential inorder to login into ec2.

./boundary connect ssh -target-id ttcp\_1234567890 -addr=http://XXXXXXXXXXX -username hello  
Credentials:  
Credential Source ID: clvlt\_jnEOdYQyew  
Credential Source Name: new ec2  
Credential Store ID: csvlt\_4lWBv8Wke7  
Credential Store Type: vault  
Secret:  
null  
hello@hst\_1234567890’s password:

It is not taking the vault secret created in vault ,basically which it should  
So is there any alternative to login into AWS resources through credential provided in vault .  
the documentation has the analyst role able to connect postgres db without providing the credential.  
boundary connect postgres -target-id ttcp\_1r9XGCXdwE -dbname northwind

So is there the similar approach for logging into ec2 instance.
