0

I am developing a server application in django REST framework which in turn uses apache knox REST APIs to work with spark sessions (create session, get session, cancel session, ...). Apache Knox supports service level authorization but I need the API level authorization which authorizes the user whether she has permission to call the given REST API. Some suggested me to use the Apache Ranger but it has no support for the REST API authorization. Is there a way so that Knox and Ranger work together for the purpose of REST API level authorization?

Thanks for any help

asked Nov 19, 2020 at 11:53

2 Answers 2

0

REST API authorization is probably not exactly what you want here - though it can easily be mapped to it. The design in play here is one of a layered approach to security. The gateway is providing service level authorization at the edge. Finer grained authorization should be available at or closer to the resource itself. Ranger plugins exist throughout the ecosystem and will allow for the same policies to be enforced regardless of path to the resource. Considering that the Knox gateway is only one way to access the proxied resources and that the same resources are available within the cluster with direct access shows how it is insufficient to enforce at the gateway. However, you can limit external actors from taxing the resources within the system with finer grained permission checks if they don't have access to the service at all.

That said, the Apache Knox gateway is very extensible and you could write your own authorization provider or extend the acls provider to do what you want. Just don't forget to protect the other paths to the same resources.

answered Jan 22, 2021 at 22:25
Sign up to request clarification or add additional context in comments.

Comments

0

Currently Apache Ranger doesn't support spark authorization. You have to rely on spark ACL's for now.

However, there is a feature request raised for spark sql so in future you can make use of it for other spark sql operations but for operations like create, get, cancel, you have to rely on spark ACL's

answered Dec 31, 2020 at 3:27

1 Comment

thanks @rikamamanus for your answer. I could manage to improve the Ranger's plugin for KNOX to be able to have method level authorization for REST API.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.