Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support authorised access to Data Sources #6328

Open
tronboto opened this issue Apr 3, 2024 · 6 comments
Open

Support authorised access to Data Sources #6328

tronboto opened this issue Apr 3, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request multiple datasource multiple datasource project

Comments

@tronboto
Copy link

tronboto commented Apr 3, 2024

Is your feature request related to a problem? Please describe.

The Data Sources feature is great, however, it currently doesn't seem to be possible to control an individual user's access to data in remote data sources.

Describe the solution you'd like

It would be great if access to remote Opensearch data sources was granted based on the principal of the logged in user and any roles they have mapped in the remote cluster.

Describe alternatives you've considered

Using the current solution, which uses the roles that are mapped to the user configured on the data source. However, we need to be able to restrict a user's access to be the same as if they were actually logged into the remote cluster.

Additional context

N/A

@tronboto tronboto added the enhancement New feature or request label Apr 3, 2024
@ananzh ananzh removed the untriaged label Apr 9, 2024
@ananzh
Copy link
Member

ananzh commented Apr 9, 2024

@bandinib-amzn could you help to take a look?

@seraphjiang
Copy link
Member

seraphjiang commented Apr 10, 2024

In general, data access policy should be managed by the remote database themselves.

Who(principal) could have what permission/access to what data is not part of datasource and won't be part of datasource.

We do respect existing access policy. Hope this helped clarification

Share identity and principal only happens when both OSD and datasource are using same identity Provider. Most of time is might not feasible e.g. OSD might use OIDC for sso, backend might use user/password

@seraphjiang seraphjiang added the multiple datasource multiple datasource project label Apr 13, 2024
@seraphjiang seraphjiang self-assigned this Apr 13, 2024
@seraphjiang
Copy link
Member

@bandinib-amzn could you help to take a look?
@ananzh feel free to tag me in the future for MDS related bug/feature request.

@tronboto
Copy link
Author

Hey @seraphjiang

We do respect existing access policy. Hope this helped clarification

Maybe I'm misunderstanding but this doesn't seem to be working for me on Opensearch 2.11.1 then. On the cluster with data_source.enabled: true, I am able to run a command, for example, GET _cat/indices in Dev Tools against the remote cluster, however, when I try to do the same from Dev Tools in the remote cluster itself, I get:

no permissions for [indices:monitor/settings/get] and User...

which is correct - the user I'm logged in as on the remote cluster doesn't have permission to do that. Note that I am logged into both Opensearch Dashboards instances with the same principal using OIDC.

I think you can also see this behaviour at: https://playground.opensearch.org/app/dev_tools#/console

If you go there and run GET _cat/indices, you get the error:

no permissions for [indices:monitor/settings/get] and User [name=mdPlayGround, backend_roles=[], requestedTenant=null]"

where mdPlayGround is presumably the user configured on the data source. At least, it's not the logged in user, which is opendistro_security_anonymous.

@kuzaxak
Copy link

kuzaxak commented Jun 8, 2024

I can confirm that Opensearch Dashboard do not forward any auth credentials if SSO is used. I would expect that it will proxy user token to downstream datasource. This way downstream datasource will be able to authorise a request.

As far as I understand right now only static auth is supported and proxy auth isn't supported yet. I'm right?

image

@seraphjiang
Copy link
Member

In order to support pass through credential from upstream to downstream securely. OSD need to encrypt the credential and downstream need to be able to decrypt the credential.

We could see if there is more needs for this feature request

Cc: @zengyan-amazon @elfisher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multiple datasource multiple datasource project
Projects
None yet
Development

No branches or pull requests

4 participants