TestProvider_Auth_UserPass.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ---
  2. version: 2
  3. interactions:
  4. - id: 0
  5. request:
  6. proto: HTTP/1.1
  7. proto_major: 1
  8. proto_minor: 1
  9. content_length: 23
  10. host: localhost:8200
  11. body: '{"password":"bob4ever"}'
  12. headers:
  13. X-Vault-Request:
  14. - "true"
  15. url: http://localhost:8200/v1/auth/customuserpasspath/login/alice
  16. method: PUT
  17. response:
  18. proto: HTTP/1.1
  19. proto_major: 1
  20. proto_minor: 1
  21. content_length: 511
  22. body: |-
  23. {
  24. "auth": {
  25. "accessor": "AbCdEfGHiJk123",
  26. "client_token": "s.fakeTOKEN123",
  27. "entity_id": "00000000-0000-0000-0000-000000000000",
  28. "lease_duration": 2764800,
  29. "metadata": {
  30. "username": "alice"
  31. },
  32. "mfa_requirement": null,
  33. "num_uses": 0,
  34. "orphan": true,
  35. "policies": [
  36. "default",
  37. "read-kv"
  38. ],
  39. "renewable": true,
  40. "token_policies": [
  41. "default",
  42. "read-kv"
  43. ],
  44. "token_type": "service"
  45. },
  46. "data": null,
  47. "lease_duration": 0,
  48. "lease_id": "",
  49. "renewable": false,
  50. "request_id": "00000000-0000-0000-0000-000000000000",
  51. "warnings": null,
  52. "wrap_info": null
  53. }
  54. headers:
  55. Cache-Control:
  56. - no-store
  57. Content-Length:
  58. - "511"
  59. Content-Type:
  60. - application/json
  61. Strict-Transport-Security:
  62. - max-age=31536000; includeSubDomains
  63. status: 200 OK
  64. code: 200
  65. duration: 0s
  66. - id: 1
  67. request:
  68. proto: HTTP/1.1
  69. proto_major: 1
  70. proto_minor: 1
  71. content_length: 0
  72. host: localhost:8200
  73. headers:
  74. X-Vault-Request:
  75. - "true"
  76. X-Vault-Token:
  77. - s.fakeTOKEN123
  78. url: http://localhost:8200/v1/secret/data/foo
  79. method: GET
  80. response:
  81. proto: HTTP/1.1
  82. proto_major: 1
  83. proto_minor: 1
  84. content_length: 330
  85. body: |-
  86. {
  87. "auth": null,
  88. "data": {
  89. "data": {
  90. "bar": "bazz",
  91. "lorem": "ipsum"
  92. },
  93. "metadata": {
  94. "created_time": "2099-09-09T09:09:09.09Z",
  95. "custom_metadata": null,
  96. "deletion_time": "",
  97. "destroyed": false,
  98. "version": 2
  99. }
  100. },
  101. "lease_duration": 0,
  102. "lease_id": "",
  103. "renewable": false,
  104. "request_id": "00000000-0000-0000-0000-000000000000",
  105. "warnings": null,
  106. "wrap_info": null
  107. }
  108. headers:
  109. Cache-Control:
  110. - no-store
  111. Content-Length:
  112. - "330"
  113. Content-Type:
  114. - application/json
  115. Strict-Transport-Security:
  116. - max-age=31536000; includeSubDomains
  117. status: 200 OK
  118. code: 200
  119. duration: 0s