MAQPNADocs

maqpna auth

Check your permissions and identity (kubectl auth can-i / whoami)

Configure-o json | yaml

Synopsis#

maqpna auth can-i VERB TYPE[/NAME] [-n NS | -A] [--subresource S] [-q]
maqpna auth can-i --list [-n NS]
maqpna auth whoami [--gateway URL] [-o json|yaml]

Description#

can-i asks the API server whether you may VERB the type (MAQPNA names and short names work: maqpna auth can-i create sess; any other resource is passed through: maqpna auth can-i create pods/exec). It prints yes or no and exits 0 or 1. The gateway's runtime kinds are authorized by the gateway's admin roles, which auth whoami lists.

Subcommands#

Examples#

maqpna auth can-i create sess -n team-a
maqpna auth can-i create pods --subresource exec -n team-a
maqpna auth whoami

What happens when you run it#

  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)