stalary edited a comment on issue #6103:
URL:
https://github.com/apache/incubator-doris/issues/6103#issuecomment-872241437
## Design Doc
Rules are stored using sqlblockList, stored in metadata, and managed in
catalog,Rules are divided by user, with support for configuring the defalut
user, which represents the default rule
Enable way
- use enable_sql_blocklist,@ConfField(mutable = true, masterOnly = false)
- admin set frontend config ("enable_sql_blocklist" = "true")
Sqlblocklist info
- name
- user
- sql
- enable
Supoort grammar
- SHOW BLOCKLIST [WHERE name|sql|user|enable = "xxx"]
- CREATE BLOCKLIST test_rule PROPERTIES ("user"="default", "sql"="select .*
from .* join .*", "enable": "true")
- ALTER BLOCKLIST test_rule PROPERTIES ("user"="test_user", "enable":
"false")
- DROP BLOCKLIST (test_rule|test_rule1,test_rule2)
Interception point
- StmtExecutor.execute -> QueryStmt -> regex match -> deny
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]