Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(cred-libs): Update user_password to username_password #2154

Merged
merged 3 commits into from
Jun 13, 2022

Conversation

louisruch
Copy link
Collaborator

@louisruch louisruch commented Jun 8, 2022

Creating a new cred library with user_password fails:

boundary credential-libraries create vault -credential-store-id $CRED_STORE_ID -vault-path "secret/data/my-secret" -name "Super secret lib" -credential-type user_password
Error from controller when performing create on vault-type credential library

Error information:
  Kind:                InvalidArgument
  Message:             Error in provided request.
  Status:              400
  context:             Error from controller when performing create on vault-type credential library

  Field-specific Errors:
    Name:              -credential-type
      Error:           Unknown credential type "user_password"

Creating a new cred library with username_password:

boundary credential-libraries create vault -credential-store-id $CRED_STORE_ID -vault-path "secret/data/my-secret" -name "Super secret lib" -credential-type username_password

Credential Library information:
  Created Time:          Wed, 08 Jun 2022 15:19:20 PDT
  Credential Store ID:   csvlt_VlFgkW6EGX
  ID:                    clvlt_gJUfsRyyFR
  Name:                  Super secret lib
  Type:                  vault
  Updated Time:          Wed, 08 Jun 2022 15:19:20 PDT
  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/data/my-secret

  Credential Type:
    username_password

Connecting to target:

boundary connect -target-id ttcp_1234567890

Proxy listening information:
  Address:             127.0.0.1
  Connection Limit:    -1
  Expiration:          Wed, 08 Jun 2022 23:20:29 PDT
  Port:                50861
  Protocol:            tcp
  Session ID:          s_dkx9C3MJ8L

  Credentials:
    Credential Source ID:   clvlt_gJUfsRyyFR
    Credential Source Name: Super secret lib
    Credential Store ID:    csvlt_VlFgkW6EGX
    Credential Store Type:  vault
    Credential Type:        username_password
    Secret:
          password:   pass
          username:   test

Curl string output

boundary credential-libraries create vault -credential-store-id $CRED_STORE_ID -vault-path "secret/data/my-secret" -name "Super secret lib" -credential-type username_password -output-curl-string

curl -X POST -H "Authorization: Bearer $(boundary config get-token -keyring-type keychain -token-name default)" -H "Content-Type: application/json" -d '{"attributes":{"path":"secret/data/my-secret"},"credential_store_id":"csvlt_VlFgkW6EGX","credential_type":"username_password","name":"Super secret lib"}' 'http://127.0.0.1:9200/v1/credential-libraries'

@louisruch louisruch force-pushed the louis-user-password branch 3 times, most recently from 17704d6 to f024735 Compare June 8, 2022 22:48
@louisruch louisruch requested review from mgaffney and jefferai and removed request for mgaffney June 8, 2022 23:01
jefferai
jefferai previously approved these changes Jun 9, 2022
@louisruch
Copy link
Collaborator Author

@ddebko PTAL

ddebko
ddebko previously approved these changes Jun 9, 2022
Copy link
Collaborator

@ddebko ddebko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@tmessi tmessi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your commit prefix should be refact not change.

@louisruch louisruch force-pushed the louis-user-password branch from 88a9ba7 to 1389059 Compare June 13, 2022 14:48
@louisruch louisruch requested a review from tmessi June 13, 2022 14:48
tmessi
tmessi previously approved these changes Jun 13, 2022
@louisruch louisruch merged commit b6ca61a into main Jun 13, 2022
@louisruch louisruch deleted the louis-user-password branch June 13, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants