Skip to content

grantChains ​

Command: grantChains
Category: Security
Status: Production Ready

Description ​

Visualize privilege inheritance chains for a user or role, including nested roles and privilege summaries.

Syntax ​

bash
hana-cli grantChains [options]

Aliases ​

  • grants
  • grantchain

Command Diagram ​

Parameters ​

Positional Arguments ​

This command does not accept positional arguments.

Options ​

OptionAliasTypeDefaultDescription
--user-ustring-Target user to analyze.
--role-rstring-Target role to analyze.
--depth-dnumber5Maximum depth of the chain.

Output Options ​

OptionAliasTypeDefaultDescription
--format-fstringtreeOutput format. Choices: tree, table, json

Connection Parameters ​

OptionAliasTypeDefaultDescription
--admin-abooleanfalseConnect via admin (default-env-admin.json)
--conn-string-Connection filename to override default-env.json

Troubleshooting ​

OptionAliasTypeDefaultDescription
--disableVerbose--quietbooleanfalseDisable verbose output
--debug-dbooleanfalseEnable debug output

For the runtime-generated option list, run:

bash
hana-cli grantChains --help

Examples ​

Basic Usage ​

bash
hana-cli grantChains --user DBUSER

Visualize the grant chain for DBUSER.

  • privilegeAnalysis - Analyze user privileges and suggest least privilege
  • privilegeError - Get insufficient privilege error details
  • roles - List roles and role metadata

See the Commands Reference for other commands in this category.

See Also ​