PageSourceSearch

https://openbao.org/assets/js/4054a822.b1c89fe9.js

js openbao.org collected 2026-10-02 06:33:03 UTC 3,723 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["10928"],{12663(e,n,i){i.r(n),i.d(n,{metadata:()=>s,default:()=>p,frontMatter:()=>l,contentTitle:()=>a,toc:()=>r,assets:()=>t});var s=JSON.parse('{"id":"commands/policy/index","title":"policy","description":"The \\"policy\\" command groups subcommands for interacting with policies. Users\\ncan write, read, and list policies in OpenBao.","source":"@site/content/docs/commands/policy/index.mdx","sourceDirName":"commands/policy","slug":"/commands/policy/","permalink":"/docs/next/commands/policy/","draft":false,"unlisted":false,"editUrl":"https://github.com/openbao/openbao/blob/main/website/content/docs/commands/policy/index.mdx","tags":[],"version":"current","frontMatter":{"sidebar_label":"Overview","description":"The \\"policy\\" command groups subcommands for interacting with policies. Users\\ncan write, read, and list policies in OpenBao."},"sidebar":"docs","previous":{"title":"reload","permalink":"/docs/next/commands/plugin/reload"},"next":{"title":"delete","permalink":"/docs/next/commands/policy/delete"}}'),o=i(94686),c=i(44812);let l={sidebar_label:"Overview",description:'The "policy" command groups subcommands for interacting with policies. Users\ncan write, read, and list policies in OpenBao.'},a="policy",t={},r=[{value:"Examples",id:"examples",level:2},{value:"Usage",id:"usage",level:2}];function d(e){let n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"policy",children:"policy"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"policy"})," command groups subcommands for interacting with policies. Users can\nwrite, read, and list policies in OpenBao."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information, please see the ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/policies",children:"policy\ndocumentation"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,o.jsx)(n.p,{children:"List all enabled policies:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-shell-session",children:"$ bao policy list\n"})}),"\n",(0,o.jsx)(n.p,{children:'Create a policy named "my-policy" from contents on local disk:'}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-shell-session",children:"$ bao policy write my-policy ./my-policy.hcl\n"})}),"\n",(0,o.jsx)(n.p,{children:"Delete the policy named my-policy:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-shell-session",children:"$ bao policy delete my-policy\n"})}),"\n",(0,o.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-text",children:"Usage: bao policy <subcommand> [options] [args]\n\n  # ...\n\nSubcommands:\n    delete    Deletes a policy by name\n    list      Lists the installed policies\n    read      Prints the contents of a policy\n    write     Uploads a named policy from a file\n"})}),"\n",(0,o.jsx)(n.p,{children:"For more information, examples, and usage about a subcommand, click on the name\nof the subcommand in the sidebar."})]})}function p(e={}){let{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},44812(e,n,i){i.d(n,{R:()=>l,x:()=>a});var s=i(92990);let o={},c=s.createContext(o);function l(e){let n=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),s.createElement(c.Provider,{value:n},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.