wiegandf opened a new issue, #13507:
URL: https://github.com/apache/druid/issues/13507

   ### Affected Version
   
   0.23.0
   
   ## Description
   
   The get endpoint for `/druid/indexer/v1/supervisor` seems to require more 
than just read permissions. With missing those permissions, the API returns a 
200 with an empty list. I would expect a 401 Unauthorized. When authorized, the 
API returns all the data required. 
   
   So basically I see two issues:
   - The API should respond with 401 for unauthorized calls
   - Why does the list supervisor operation require write permissions?
   
   This behavior breaks e.g. 
https://github.com/opstree/druid-exporter/blob/master/collector/druid.go#L50-L67.
 
   
   ### Configurations in use
   druid-basic-security
   
   ```
     druid_auth_authenticatorChain: '["MyBasicMetadataAuthenticator"]'
     druid_auth_authenticator_MyBasicMetadataAuthenticator_type: basic
     druid_auth_authenticator_MyBasicMetadataAuthenticator_authorizerName: 
MyBasicMetadataAuthorizer
     druid_auth_authorizers: '["MyBasicMetadataAuthorizer"]'
     druid_auth_authorizer_MyBasicMetadataAuthorizer_type: basic
     druid_escalator_type: basic
     druid_escalator_internalClientUsername: druid_system
     druid_escalator_authorizerName: MyBasicMetadataAuthorizer
   ```
   
   ### Steps to reproduce the problem
   -  Have one user with the following permissions: 
       ```json
       [
            {
                    "resource": {
                            "name": ".*",
                            "type": "DATASOURCE"
                    },
                    "action": "WRITE"
            },
            {
                    "resource": {
                            "name": ".*",
                            "type": "CONFIG"
                    },
                    "action": "WRITE"
            },
            {
                    "resource": {
                            "name": ".*",
                            "type": "STATE"
                    },
                    "action": "WRITE"
            },
            {
                    "resource": {
                            "name": ".*",
                            "type": "DATASOURCE"
                    },
                    "action": "READ"
            },
            {
                    "resource": {
                            "name": ".*",
                            "type": "CONFIG"
                    },
                    "action": "READ"
            },
            {
                    "resource": {
                            "name": ".*",
                            "type": "STATE"
                    },
                    "action": "READ"
            }
       ]
       ```
   - Another one with just
     ```json
     [
        {
                "resource": {
                        "name": ".*",
                        "type": "DATASOURCE"
                },
                "action": "READ"
        },
        {
                "resource": {
                        "name": ".*",
                        "type": "CONFIG"
                },
                "action": "READ"
        },
        {
                "resource": {
                        "name": ".*",
                        "type": "STATE"
                },
                "action": "READ"
        }
     ]
     ```
   


-- 
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]

Reply via email to