OAuth support in Turnilo #734
Replies: 2 comments 1 reply
-
To reiterate on #714: We want to remove
Because you requested some new features around this, the API is not final (and we'd not decided yet on names ;)). We would like to add ability to not only restrict access to data cube but also better handle restricted data cube. For example some data cubes should be hidden, but sometimes it would be nice if Turnilo would show message like "You have no access to this Data Cube. Contact your Administrator". |
Beta Was this translation helpful? Give feedback.
-
Hi. Please tell me what I am missing when I turn on OAuth. The documentation says that it is enough to add only
to top level in config file. After applying the new configuration, I don't get any effect or errors. What am I doing wrong? Turnilo v1.40.1 |
Beta Was this translation helpful? Give feedback.
-
In 1.32.0 we added support for OAuth in Turnilo.
How it works
As you can see, Turnilo does only authorisation part which is regulated with OAuth spec. You need to secure your endpoints on the server with plugins.
Configuration
To enable OAuth support you need to add top level
oauth
option in your config with following fields:clientId
: OAuth Client Identifier for your Turnilo instancetokenEndpoint
: Full address of your token endpointauthorizationEndpoint
: Full address of your authorization endpointredirectUri
: Full address of your Turnilo installation. If you go to this address in browser, your Turnilo install should launch and show home view.tokenHeaderName
: Name of your choosing for the OAuth token header. You will be reading this header in your server plugin.Example:
Server plugin
Now every request to backend has header with user token. You can write plugin for server where you check token with your identity server and restrict access. You can also set
allowed-datacubes
setting, but more about it later.We use plugin that looks something like this:
What can I do with token?
x-turnilo-allow-datacubes
header based on users permissions. Please note, that this feature will change in the future. We want to keep functionality but we would prefer to useturniloMetadata
object instead of header.turniloMetadata
object and use it in your query decorator. You could hide some rows for specific users.What is next?
We want to smooth the edges around
x-turnilo-allow-datacubes
. We started some discussion there in #714 .Because list of data sources is now behind endpoint we also have some technical debt around that.
Beta Was this translation helpful? Give feedback.
All reactions