aljoscha commented on a change in pull request #10178:
[FLINK-14433][DataStream] Move generated Jaas conf file from /tmp directory to
Job specific directory
URL: https://github.com/apache/flink/pull/10178#discussion_r348418557
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/JaasModule.java
##########
@@ -66,19 +71,29 @@
private DynamicConfiguration currentConfig;
+ /**
+ * The working directory that the jaas file will install into.
+ */
+ private final String workingDir;
+
public JaasModule(SecurityConfiguration securityConfig) {
this.securityConfig = checkNotNull(securityConfig);
+ String[] dirs =
splitPaths(securityConfig.getFlinkConfig().getString(CoreOptions.TMP_DIRS));
+ // should at least a single directory.
+ checkState(dirs.length > 0);
+ this.workingDir = dirs[0];
}
@Override
- public void install() throws SecurityInstallException {
+ public void install() {
// ensure that a config file is always defined, for
compatibility with
// ZK and Kafka which check for the system property and
existence of the file
priorConfigFile =
System.getProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG, null);
if (priorConfigFile == null) {
- File configFile = generateDefaultConfigFile();
+ File configFile = generateDefaultConfigFile(workingDir);
System.setProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG,
configFile.getAbsolutePath());
+ LOG.info("Jaas file will install into {}.", configFile);
Review comment:
```suggestion
LOG.info("Jaas file will be created as {}.",
configFile);
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services