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

SSI database credentials #3258

Open
emanuele45 opened this issue Nov 12, 2018 · 2 comments
Open

SSI database credentials #3258

emanuele45 opened this issue Nov 12, 2018 · 2 comments

Comments

@emanuele45
Copy link
Contributor

Working on the database for the PSR4 I broken up the classes and reworked most of the code.
I'm now working on the initialization of the connection, and I'm wondering: what the heck is the purpose of the SSI credentials?
I mean: if we use another connection for SSI, this connection should have access to the original database anyway, because we need all the content of the members table, permissions, etc.
There is quite a bit of stuff we cannot do without.
So, we'd need to somehow swap database at some points in the SSI-related code in order to keep the queries point to the right databases.

From the use-cases I can think of, this solution honestly is not really something that you see around every day.
The way I'm reworking the code would allow to instantiate multiple connections (give the fact I'm dropping the singleton), so I think that having database return the connection to "our" database and nothing else. Then, if someone needs a connection to a different db, he can instantiate a new connection and have its own "database" function (maybe with a different name) and do it's work.

Bottom line: I propose to remove any reference to SSI-related connection databases and live with just one connection inside our code.

What do you think?

@emanuele45 emanuele45 added this to the 2.0 milestone Nov 12, 2018
@Spuds
Copy link
Contributor

Spuds commented Nov 12, 2018

The only thing I can think of would be to allow a less privileged db user access via SSI interface.

@Vekseid
Copy link
Contributor

Vekseid commented Nov 17, 2018

The only real reason to do that is to separate the writer and reader. My most complex SSI code has to bring in the real credentials anyway.

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

No branches or pull requests

3 participants