PageSourceSearch

https://openbao.org/assets/js/955b6810.943e6f16.js

js openbao.org collected 2026-10-02 06:35:37 UTC 10,168 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["17158"],{2594(e,s,t){t.r(s),t.d(s,{metadata:()=>n,default:()=>o,frontMatter:()=>i,contentTitle:()=>a,toc:()=>c,assets:()=>d});var n=JSON.parse('{"id":"api/secret/cubbyhole","title":"Cubbyhole secrets engine (API)","description":"This is the API documentation for the OpenBao Cubbyhole secrets engine.","source":"@site/versioned_docs/version-2.6.x/api/secret/cubbyhole.mdx","sourceDirName":"api/secret","slug":"/api/secret/cubbyhole","permalink":"/docs/2.6.x/api/secret/cubbyhole","draft":false,"unlisted":false,"editUrl":"https://github.com/openbao/openbao/blob/release/2.6.x/website/content/docs/api/secret/cubbyhole.mdx","tags":[],"version":"2.6.x","frontMatter":{"sidebar_label":"Cubbyhole","description":"This is the API documentation for the OpenBao Cubbyhole secrets engine."},"sidebar":"api","previous":{"title":"Overview","permalink":"/docs/2.6.x/api/secret/"},"next":{"title":"Overview","permalink":"/docs/2.6.x/api/secret/databases/"}}'),l=t(94686),r=t(44812);let i={sidebar_label:"Cubbyhole",description:"This is the API documentation for the OpenBao Cubbyhole secrets engine."},a="Cubbyhole secrets engine (API)",d={},c=[{value:"Read secret",id:"read-secret",level:2},{value:"Parameters",id:"parameters",level:3},{value:"Sample request",id:"sample-request",level:3},{value:"Sample response",id:"sample-response",level:3},{value:"List secrets",id:"list-secrets",level:2},{value:"Parameters",id:"parameters-1",level:3},{value:"Sample request",id:"sample-request-1",level:3},{value:"Sample response",id:"sample-response-1",level:3},{value:"Create/Update secret",id:"createupdate-secret",level:2},{value:"Parameters",id:"parameters-2",level:3},{value:"Sample payload",id:"sample-payload",level:3},{value:"Sample request",id:"sample-request-2",level:3},{value:"Delete secret",id:"delete-secret",level:2},{value:"Parameters",id:"parameters-3",level:3},{value:"Sample request",id:"sample-request-3",level:3}];function h(e){let s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.header,{children:(0,l.jsx)(s.h1,{id:"cubbyhole-secrets-engine-api",children:"Cubbyhole secrets engine (API)"})}),"\n",(0,l.jsxs)(s.p,{children:["This is the API documentation for the OpenBao Cubbyhole secrets engine. For\ngeneral information about the usage and operation of the Cubbyhole secrets\nengine, please see the\n",(0,l.jsx)(s.a,{href:"/docs/2.6.x/secrets/cubbyhole",children:"OpenBao Cubbyhole documentation"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["This documentation assumes the Cubbyhole secrets engine is enabled at the\n",(0,l.jsx)(s.code,{children:"/cubbyhole"})," path in OpenBao. Since it is possible to enable secrets engines at\nany location, please update your API calls accordingly."]}),"\n",(0,l.jsx)(s.h2,{id:"read-secret",children:"Read secret"}),"\n",(0,l.jsx)(s.p,{children:"This endpoint retrieves the secret at the specified location."}),"\n",(0,l.jsxs)(s.table,{children:[(0,l.jsx)(s.thead,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Method"}),(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Path"})]})}),(0,l.jsx)(s.tbody,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"GET"})}),(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"/cubbyhole/:path"})})]})})]}),"\n",(0,l.jsx)(s.h3,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"path"})," ",(0,l.jsx)(s.code,{children:"(string: <required>)"})," \u2013 Specifies the path of the secret to read.\nThis is specified as part of the URL."]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"sample-request",children:"Sample request"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-shell-session",children:'$ curl \\\n    --header "X-Vault-Token: ..." \\\n    http://127.0.0.1:8200/v1/cubbyhole/my-secret\n'})}),"\n",(0,l.jsx)(s.h3,{id:"sample-response",children:"Sample response"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-json",children:'{\n  "auth": null,\n  "data": {\n    "foo": "bar"\n  },\n  "lease_duration": 0,\n  "lease_id": "",\n  "renewable": false\n}\n'})}),"\n",(0,l.jsx)(s.h2,{id:"list-secrets",children:"List secrets"}),"\n",(0,l.jsxs)(s.p,{children:["This endpoint returns a list of secret entries at the specified location.\nFolders are suffixed with ",(0,l.jsx)(s.code,{children:"/"}),". The input must be a folder; list on a file will\nnot return a value. The values themselves are not accessible via this command."]}),"\n",(0,l.jsxs)(s.table,{children:[(0,l.jsx)(s.thead,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Method"}),(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Path"})]})}),(0,l.jsx)(s.tbody,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"LIST"})}),(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"/cubbyhole/:path"})})]})})]}),"\n",(0,l.jsx)(s.h3,{id:"parameters-1",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"path"})," ",(0,l.jsx)(s.code,{children:"(string: <required>)"})," \u2013 Specifies the path of the secrets to list.\nThis is specified as part of the URL."]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"sample-request-1",children:"Sample request"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-shell-session",children:'$ curl \\\n    --header "X-Vault-Token: ..." \\\n    --request LIST \\\n    http://127.0.0.1:8200/v1/cubbyhole/my-secret\n'})}),"\n",(0,l.jsx)(s.h3,{id:"sample-response-1",children:"Sample response"}),"\n",(0,l.jsxs)(s.p,{children:["The example below shows output for a query path of ",(0,l.jsx)(s.code,{children:"cubbyhole/"})," when there are\nsecrets at ",(0,l.jsx)(s.code,{children:"cubbyhole/foo"})," and ",(0,l.jsx)(s.code,{children:"cubbyhole/foo/bar"}),"; note the difference in the\ntwo entries."]}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-json",children:'{\n  "auth": null,\n  "data": {\n    "ke
1ys": ["foo", "foo/"]\n  },\n  "lease_duration": 2764800,\n  "lease_id": "",\n  "renewable": false\n}\n'})}),"\n",(0,l.jsx)(s.h2,{id:"createupdate-secret",children:"Create/Update secret"}),"\n",(0,l.jsx)(s.p,{children:"This endpoint stores a secret at the specified location."}),"\n",(0,l.jsxs)(s.table,{children:[(0,l.jsx)(s.thead,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Method"}),(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Path"})]})}),(0,l.jsx)(s.tbody,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"POST"})}),(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"/cubbyhole/:path"})})]})})]}),"\n",(0,l.jsx)(s.h3,{id:"parameters-2",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"path"})," ",(0,l.jsx)(s.code,{children:"(string: <required>)"})," \u2013 Specifies the path of the secrets to\ncreate/update. This is specified as part of the URL."]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:":key"})," ",(0,l.jsx)(s.code,{children:'(string: "")'})," \u2013\xa0Specifies a key in the payload, paired with an associated value, to\nbe held at the given location. Multiple key/value pairs can be specified, and\nall will be returned on a read operation."]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"sample-payload",children:"Sample payload"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-json",children:'{\n  "foo": "bar",\n  "zip": "zap"\n}\n'})}),"\n",(0,l.jsx)(s.h3,{id:"sample-request-2",children:"Sample request"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-shell-session",children:'$ curl \\\n    --header "X-Vault-Token: ..." \\\n    --request POST \\\n    --data @payload.json \\\n    http://127.0.0.1:8200/v1/cubbyhole/my-secret\n'})}),"\n",(0,l.jsx)(s.h2,{id:"delete-secret",children:"Delete secret"}),"\n",(0,l.jsx)(s.p,{children:"This endpoint deletes the secret at the specified location."}),"\n",(0,l.jsxs)(s.table,{children:[(0,l.jsx)(s.thead,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Method"}),(0,l.jsx)(s.th,{style:{textAlign:"left"},children:"Path"})]})}),(0,l.jsx)(s.tbody,{children:(0,l.jsxs)(s.tr,{children:[(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"DELETE"})}),(0,l.jsx)(s.td,{style:{textAlign:"left"},children:(0,l.jsx)(s.code,{children:"/cubbyhole/:path"})})]})})]}),"\n",(0,l.jsx)(s.h3,{id:"parameters-3",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"path"})," ",(0,l.jsx)(s.code,{children:"(string: <required>)"})," \u2013 Specifies the path of the secret to delete.\nThis is specified as part of the URL."]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"sample-request-3",children:"Sample request"}),"\n",(0,l.jsx)(s.pre,{children:(0,l.jsx)(s.code,{className:"language-shell-session",children:'$ curl \\\n    --header "X-Vault-Token: ..." \\\n    --request DELETE \\\n    http://127.0.0.1:8200/v1/cubbyhole/my-secret\n'})})]})}function o(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},44812(e,s,t){t.d(s,{R:()=>i,x:()=>a});var n=t(92990);let l={},r=n.createContext(l);function i(e){let s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.