I am trying to grant read/write/bulkimport table permissions to a newly created user account. I have not had any success using wild cards in accumulo shell to grant permissions to all tables at once.
I have tried the following grant command variants:
grant Table.READ -t * ...
grant Table.READ -t '*' ...
grant Table.READ -t \\* ...
grant Table.READ -p * ...
grant Table.READ -p so_* ...
grant Table.* ...
For -t/-p wildcards, I get either one of the following errors:
WARN : No tables found that match your criteria
ERROR: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
ERROR: org.apache.accumulo.core.client.TableNotFoundException: Table * does not exist
For Table.*, I get:
ERROR: java.lang.IllegalArgumentException: No such table permission
I have a lot of tables to grant permissions for, so I am really hoping wildcards are an option.
Wildcards are not currently an option. Granting a user permission for a table should be an action done with care. If you must grant a user permission for a lot of tables, you can create a small Java program to list the tables and grant permission.
If you know in advance that a lot of tables are in the same "security domain", you can create a table "namespace", and grant permission to all tables in the namespace.
If you must use the shell (which is not the primary API, and provided merely for triage and small trivial actions), you may be able to do it by creating a small script, and executing it as a batch. Run the shell with the -?
or --help
option to see the available ways you can execute commands from a file or from STDIN.
If you wish to submit a request to add a wildcard feature, you should contact the developers or open an issue or create a new pull request to propose the change.