Open tooptoop4 opened 4 years ago
a challenge with this ldap passthrough approach is when using impersonation (ie via superset) the principal is the superuser and the user is the enduser but the enduser's password is not supplied in the connection (just the superuser's username/passw is) so the JDBC catalog will not have access to the end users password. But then again I don't think a shared data source in superset with impersonation could get extraCredentials from each user anyway
wonder if this helps
credentialProvider.getConnectionUser(Optional.empty())
.ifPresent(user -> {
try {
dataSource.setUser(user);
}
catch (SQLException e) {
throw new RuntimeException(e);
}
});
credentialProvider.getConnectionPassword(Optional.empty())
.ifPresent(password -> {
try {
dataSource.setPassword(password);
}
catch (SQLException e) {
throw new RuntimeException(e);
}
});
hello @tooptoop4 any idea where I can add this?? I have Trino realizing 'who' is executing the queries... but I want to pass in that user/pass of the person to the connection. Trying to find the file to add this to.
Thanks!
@matt12eagles ignore comment above. https://github.com/trinodb/trino/issues/8493#issuecomment-878244305 has the fix
Allow catalog properties (ie mysql) to refer to each user's presto LDAP credentials WITHOUT the user having to pass extraCredentials parameter in their JDBC connection string
eg Catalog properties (ie server side)
When set to
<LDAP>
then each user's credentials from their Presto client connection pass through to the catalog JDBC source (ie mysql, oracle, postgres..etc)Why? 2 problems with extraCredentials being client-side: