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

Oracle Proxy User #186

Closed
jondmoon opened this issue Jan 11, 2019 · 5 comments
Closed

Oracle Proxy User #186

jondmoon opened this issue Jan 11, 2019 · 5 comments

Comments

@jondmoon
Copy link

This is not really an issue but a question. I am trying to build a REST API for our enterprise Oracle database, but one requirement is that we be able to use a proxy user so the database sees all interactions as the proxy user instead of the one whose connection information is stored in the system. I have found how it is done with the oracledb client (setting the username as MAINUSER[PROXY]), but I wasn't sure if there was a way to modify that connection string per user connection, pulling the username through a stored value on that connection. I don't have a lot of experience with feathers and have been trying out various scenarios with about 10 different API backends to try and get this to work, so right now I am a little lost in what is possible. I found a post on the knex issue board (knex/knex#2660) where they are talking about ways to add the functionality, but I wasn't sure that even if it got merged into the core of knex if this would be possible with feathers.

Thanks.

Jon

@daffl
Copy link
Member

daffl commented Jan 12, 2019

All database adapter are fairly strict separating Feathers from the database connector functionality. If it is possible with Knex it will be possible to use it with this module.

@jondmoon
Copy link
Author

jondmoon commented Jan 14, 2019 via email

@daffl
Copy link
Member

daffl commented Jan 14, 2019

This is all documented in the Readme of this repository. The CLIs will put this connection code in a knex.js file. Yes they all share the same instance with the connection being established on application startup. Creating a new connection for every request would be very inefficient. Not sure I understand why a client would want to modify the connector.

@jondmoon
Copy link
Author

jondmoon commented Jan 14, 2019 via email

@daffl
Copy link
Member

daffl commented Jan 14, 2019

You can set those permissions on a per-request level via params.knex. What I'm saying is that neither Feathers nor the adapter is in the way of how to use Knex. If there is a way to do it with KnexJS (or Sequelize) then it will be possible with the Feathers adapters. Like I said, reconnecting on every request will be very inefficient no matter what framework you use and probably not the intended goal design goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants