zjffdu commented on a change in pull request #3415: [ZEPPELIN-1070]: Inject Credentials in any Interpreter-Code - 0.8x URL: https://github.com/apache/zeppelin/pull/3415#discussion_r308252677
########## File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java ########## @@ -434,7 +434,12 @@ protected Object jobRun() throws Throwable { try { InterpreterContext context = getInterpreterContext(); InterpreterContext.set(context); - InterpreterResult ret = interpreter.interpret(script, context); + UserCredentials creds = context.getAuthenticationInfo().getUserCredentials(); Review comment: Could we introduce interpreter local property (via `context.getLocalProperties`) that controls whether to apply injecting password ? Because this approach may introduce 2 issues: * performance impact, especially when the code or interpreter result is large. * code or interpreter result may be corrupted. Here's the local property sample ``` %sql(injectCredentials=true) select ... ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services