[doc](auth) Add guide for writing a custom authorization plugin#4009
Open
arpitjain099 wants to merge 1 commit into
Open
[doc](auth) Add guide for writing a custom authorization plugin#4009arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
Document the AccessControllerFactory and CatalogAccessController SPI that lets a third-party authorization system plug into Doris. The framework has been public since apache/doris#40750 and backs the Ranger integration, but the docs site had no page on how to write a controller of your own. The page covers the two interfaces and their methods, classpath and external-jar registration, the access_controller_type / access_controller config knobs for internal and external catalogs, a skeleton, the Ranger reference implementation, and the one-controller-per-JVM guidance from apache/doris#65570. Registered in the Authorization sidebar section. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Doris has supported external authorization through the
AccessControllerFactory/CatalogAccessControllerSPI since #40750, with Apache Ranger as the reference implementation, but there is no page documenting the SPI itself. Today anyone who wants to back Doris authorization with a different system (OPA, OpenFGA, an in-house entitlement service) has to reverse-engineer it from the Ranger code.This adds
admin-manual/auth/authorization/custom.mdalongside the existing internal and Ranger authorization docs, and links it into the sidebar. It covers:CatalogAccessControllerandAccessControllerFactory, with the actual method signatures and the parts worth knowing up front (thehasGlobaldefault overloads,checkColsPrivthrowingAuthorizationExceptioninstead of returning a boolean, and masking/row-filter returning empty by default)META-INF/servicesfile for an in-tree plugin, and the external plugin directory for a standalone jaraccess_controller_type+authorization_config_file_path) and external catalogs (access_controller.class+access_controller.properties.*)All interface signatures and config keys were checked against the current fe-core source. This also gives external-authorizer work like the OpenFGA controller in #65685 a place to point its readers.
Notes on versions and languages: the page is added to the current (dev) docs and in English first. The SPI has existed since 3.0, so this can be backported to the 3.x and 4.x versioned docs and translated to Chinese / Japanese as follow-ups. Happy to fold those into this PR instead if you would prefer them together.
Versions
Languages
Docs Checklist