]
Steven Hawkins commented on TEIID-4897:
---------------------------------------
The subject is expected to not be null as long as you are using a security domain.
If you are really on 8.11, you'll need to reproduce the issue in a later version - and
clarify what the user (is it from a jdbc/odbc/web client) and source query (is it part of
the main query plan or part of a materialized view load) are doing.
Null pointer on ExecutionContext.getSubject().getPrincipals()
-------------------------------------------------------------
Key: TEIID-4897
URL:
https://issues.jboss.org/browse/TEIID-4897
Project: Teiid
Issue Type: Bug
Affects Versions: 8.11
Reporter: Rafael Coutinho
Assignee: Steven Hawkins
Priority: Minor
Is there any configuration that would avoid my translator to get the user logged into the
TEIID connection?
I'm extending the jdbc connector and during a query i want to get the currently
logged user as displayed below.
However I always get null for getSubject.
@Override
public ResultSetExecution createResultSetExecution(QueryExpression command,
ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws
TranslatorException {
try {
System.out.println(executionContext.getSubject());
System.out.println(executionContext.getSubject().getPrincipals());
} catch (Exception e) {
System.err.println(e.getMessage());
}
return new SagenceIonicTranslatorExecution(command, conn, executionContext, this);
}