[docs] Flink add_acl examples in procedures.md do not match the implementation
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 92/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Compare website/docs/engine-flink/procedures.md with website/docs/security/authorization.md, then check AbstractAclProcedure, PermissionType, and OperationType to confirm the accepted values. Update the resource, permission, and operation descriptions and the table-level example; done means add_acl, drop_acl, and list_acl document only values supported by the parser.
Written by the indexing model from the issue text.
Description
Search before asking
- I searched in the issues and found nothing similar.
Fluss version
0.9.0 (latest release)
Tested with apache/fluss:0.9.1-incubating / apache/fluss-quickstart-flink:1.20-0.9.1-incubating. The same text is still on current website/docs/engine-flink/procedures.md.
Please describe the bug 🐞
The Flink Procedures page documents sys.add_acl with values the procedure cannot accept. The Security page (website/docs/security/authorization.md) already has the correct format.
Against a SASL + authorizer cluster from the Security quickstart, the documented examples fail as follows.
1. Table resource without the cluster. prefix
Documented example:
CALL sys.add_acl(
resource => 'my_database.my_table',
permission => 'ALLOW',
principal => 'User:Bob',
operation => 'WRITE',
host => '192.168.1.100'
);
Result:
java.lang.IllegalArgumentException: resource must be in format cluster.${database}.${table}
AbstractAclProcedure requires cluster, cluster.<db>, or cluster.<db>.<table>. 'CLUSTER' happens to work because the first segment is compared case-insensitively, but 'my_database.my_table' does not.
2. DENY is documented as a valid permission
The page says valid values are 'ALLOW' or 'DENY'. Calling add_acl with permission => 'DENY' fails:
java.lang.IllegalArgumentException: No enum constant org.apache.fluss.security.acl.PermissionType.DENY
PermissionType only has ANY and ALLOW, with a comment that DENY will be added later. authorization.md already says only ALLOW is supported.
3. Operation names that do not exist
The page lists 'DELETE', 'CLUSTER_ACTION', and 'IDEMPOTENT_WRITE'. OperationType is ANY / ALL / READ / WRITE / CREATE / DROP / ALTER / DESCRIBE. operation => 'DELETE' fails with:
java.lang.IllegalArgumentException: No enum constant org.apache.fluss.security.acl.OperationType.DELETE
drop_acl / list_acl say they accept the same values as add_acl, so those sections inherit the same mistakes.
Solution
Align procedures.md with authorization.md and the procedure parser:
- Resource:
cluster,cluster.<database>,cluster.<database>.<table> - Permission:
ALLOWonly (until DENY exists) - Operation:
READ,WRITE,CREATE,DROP,ALTER,DESCRIBE,ALL
Replace the table-level example with something like cluster.my_database.my_table.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 628
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 138
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/fluss
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100