You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/10/26 08:57:10 UTC
[GitHub] [flink] gaborgsomogyi opened a new pull request, #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
gaborgsomogyi opened a new pull request, #21160:
URL: https://github.com/apache/flink/pull/21160
## What is the purpose of the change
`HadoopModule` is quite complex and contains reflection which can be simplified. In this PR I've made this simplification keeping the original functionality.
The other important intention is that `flink-runtime` module has used several things from `flink-hadoop-fs` module which is just bad from architectural perspective. In this PR this I've eliminated this.
## Brief change log
* Used `KerberosLoginProvider` in `HadoopModule`
## Verifying this change
* Existing unit tests
* Manually on YARN and K8S (please see an example [here](https://gist.github.com/gaborgsomogyi/ac4f71ead8494da2f5c35265bcb1e885))
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] steveloughran commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
steveloughran commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1005503883
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java:
##########
@@ -69,71 +60,34 @@ public void install() throws SecurityInstallException {
UserGroupInformation loginUser;
try {
- if (UserGroupInformation.isSecurityEnabled()
- && !StringUtils.isBlank(securityConfig.getKeytab())
- && !StringUtils.isBlank(securityConfig.getPrincipal())) {
- String keytabPath = (new File(securityConfig.getKeytab())).getAbsolutePath();
-
- UserGroupInformation.loginUserFromKeytab(securityConfig.getPrincipal(), keytabPath);
-
- loginUser = UserGroupInformation.getLoginUser();
-
- // supplement with any available tokens
- String fileLocation =
- System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
- if (fileLocation != null) {
- Credentials credentialsFromTokenStorageFile =
- Credentials.readTokenStorageFile(
- new File(fileLocation), hadoopConfiguration);
-
- // if UGI uses Kerberos keytabs for login, do not load HDFS delegation token
- // since
- // the UGI would prefer the delegation token instead, which eventually expires
- // and does not fallback to using Kerberos tickets
- Credentials credentialsToBeAdded = new Credentials();
- final Text hdfsDelegationTokenKind = new Text("HDFS_DELEGATION_TOKEN");
- final Text hbaseDelegationTokenKind = new Text("HBASE_AUTH_TOKEN");
- Collection<Token<? extends TokenIdentifier>> usrTok =
- credentialsFromTokenStorageFile.getAllTokens();
- // If UGI use keytab for login, do not load HDFS/HBase delegation token.
- for (Token<? extends TokenIdentifier> token : usrTok) {
- if (!token.getKind().equals(hdfsDelegationTokenKind)
- && !token.getKind().equals(hbaseDelegationTokenKind)) {
- credentialsToBeAdded.addToken(token.getService(), token);
- }
+ KerberosLoginProvider kerberosLoginProvider = new KerberosLoginProvider(securityConfig);
+ if (kerberosLoginProvider.isLoginPossible()) {
+ loginUser = kerberosLoginProvider.doLogin();
+
+ if (loginUser.isFromKeytab()) {
+ String fileLocation =
+ System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
+ if (fileLocation != null) {
+ Credentials credentials =
+ Credentials.readTokenStorageFile(
+ new File(fileLocation), hadoopConfiguration);
+ loginUser.addCredentials(credentials);
}
-
- loginUser.addCredentials(credentialsToBeAdded);
- }
- } else {
- // login with current user credentials (e.g. ticket cache, OS login)
- // note that the stored tokens are read automatically
- try {
- // Use reflection API to get the login user object
- // UserGroupInformation.loginUserFromSubject(null);
- Method loginUserFromSubjectMethod =
- UserGroupInformation.class.getMethod(
- "loginUserFromSubject", Subject.class);
- loginUserFromSubjectMethod.invoke(null, (Subject) null);
Review Comment:
ooh, its more complex than that. look at the source.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1303207792
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1294730242
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1293904151
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1295244072
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1293126354
Based on the fact that the UGI APIs are not doing the same things I've refactored the original PR and using the exact same API calls. Re-tested it manually and works fine.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1293126592
cc @mbalassi
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1291861702
@steveloughran So if I understand correctly it would be better to use the original UGI calls instead of the other APIs because:
* The ticket cache part has major differences
* The keytab part is not starting the renewer thread
Correct me if I'm wrong.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zentol commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1009301538
##########
flink-runtime/src/test/java/org/apache/flink/runtime/hadoop/HadoopUserUtilsITCasae.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.hadoop;
+
+import org.apache.hadoop.security.UserGroupInformation;
+import org.junit.jupiter.api.Test;
+import org.mockito.MockedStatic;
+
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.KERBEROS;
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.PROXY;
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.SIMPLE;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.mockStatic;
+import static org.mockito.Mockito.when;
+
+/** Unit tests for Hadoop user utils. */
+class HadoopUserUtilsITCasae {
Review Comment:
```suggestion
class HadoopUserUtilsITCase {
```
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1291728233
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "6d3989d4e4ea6bbe429b0f8d6b358c360fbe261e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "6d3989d4e4ea6bbe429b0f8d6b358c360fbe261e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6d3989d4e4ea6bbe429b0f8d6b358c360fbe261e UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1015341137
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java:
##########
@@ -69,71 +61,34 @@ public void install() throws SecurityInstallException {
UserGroupInformation loginUser;
try {
- if (UserGroupInformation.isSecurityEnabled()
- && !StringUtils.isBlank(securityConfig.getKeytab())
- && !StringUtils.isBlank(securityConfig.getPrincipal())) {
- String keytabPath = (new File(securityConfig.getKeytab())).getAbsolutePath();
-
- UserGroupInformation.loginUserFromKeytab(securityConfig.getPrincipal(), keytabPath);
-
+ KerberosLoginProvider kerberosLoginProvider = new KerberosLoginProvider(securityConfig);
+ if (kerberosLoginProvider.isLoginPossible()) {
+ kerberosLoginProvider.doLogin();
loginUser = UserGroupInformation.getLoginUser();
- // supplement with any available tokens
- String fileLocation =
- System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
- if (fileLocation != null) {
- Credentials credentialsFromTokenStorageFile =
- Credentials.readTokenStorageFile(
- new File(fileLocation), hadoopConfiguration);
-
- // if UGI uses Kerberos keytabs for login, do not load HDFS delegation token
- // since
- // the UGI would prefer the delegation token instead, which eventually expires
- // and does not fallback to using Kerberos tickets
- Credentials credentialsToBeAdded = new Credentials();
- final Text hdfsDelegationTokenKind = new Text("HDFS_DELEGATION_TOKEN");
- final Text hbaseDelegationTokenKind = new Text("HBASE_AUTH_TOKEN");
- Collection<Token<? extends TokenIdentifier>> usrTok =
- credentialsFromTokenStorageFile.getAllTokens();
- // If UGI use keytab for login, do not load HDFS/HBase delegation token.
- for (Token<? extends TokenIdentifier> token : usrTok) {
- if (!token.getKind().equals(hdfsDelegationTokenKind)
- && !token.getKind().equals(hbaseDelegationTokenKind)) {
- credentialsToBeAdded.addToken(token.getService(), token);
- }
+ if (loginUser.isFromKeytab()) {
+ String fileLocation =
+ System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
+ if (fileLocation != null) {
+ Credentials credentials =
+ Credentials.readTokenStorageFile(
+ new File(fileLocation), hadoopConfiguration);
+ loginUser.addCredentials(credentials);
}
-
- loginUser.addCredentials(credentialsToBeAdded);
}
} else {
- // login with current user credentials (e.g. ticket cache, OS login)
- // note that the stored tokens are read automatically
- try {
- // Use reflection API to get the login user object
- // UserGroupInformation.loginUserFromSubject(null);
- Method loginUserFromSubjectMethod =
- UserGroupInformation.class.getMethod(
- "loginUserFromSubject", Subject.class);
Review Comment:
Just to help reviewers this API has been added in Hadoop v2.3.0. Please see [this](https://github.com/apache/hadoop/blob/e7ae2e1d660f4adebf02d8a7fc6e092dfa5d05b0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java#L717).
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1005428465
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java:
##########
@@ -69,71 +60,34 @@ public void install() throws SecurityInstallException {
UserGroupInformation loginUser;
try {
- if (UserGroupInformation.isSecurityEnabled()
- && !StringUtils.isBlank(securityConfig.getKeytab())
- && !StringUtils.isBlank(securityConfig.getPrincipal())) {
- String keytabPath = (new File(securityConfig.getKeytab())).getAbsolutePath();
-
- UserGroupInformation.loginUserFromKeytab(securityConfig.getPrincipal(), keytabPath);
-
- loginUser = UserGroupInformation.getLoginUser();
-
- // supplement with any available tokens
- String fileLocation =
- System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
- if (fileLocation != null) {
- Credentials credentialsFromTokenStorageFile =
- Credentials.readTokenStorageFile(
- new File(fileLocation), hadoopConfiguration);
-
- // if UGI uses Kerberos keytabs for login, do not load HDFS delegation token
- // since
- // the UGI would prefer the delegation token instead, which eventually expires
- // and does not fallback to using Kerberos tickets
- Credentials credentialsToBeAdded = new Credentials();
- final Text hdfsDelegationTokenKind = new Text("HDFS_DELEGATION_TOKEN");
- final Text hbaseDelegationTokenKind = new Text("HBASE_AUTH_TOKEN");
- Collection<Token<? extends TokenIdentifier>> usrTok =
- credentialsFromTokenStorageFile.getAllTokens();
- // If UGI use keytab for login, do not load HDFS/HBase delegation token.
- for (Token<? extends TokenIdentifier> token : usrTok) {
- if (!token.getKind().equals(hdfsDelegationTokenKind)
- && !token.getKind().equals(hbaseDelegationTokenKind)) {
- credentialsToBeAdded.addToken(token.getService(), token);
- }
+ KerberosLoginProvider kerberosLoginProvider = new KerberosLoginProvider(securityConfig);
+ if (kerberosLoginProvider.isLoginPossible()) {
+ loginUser = kerberosLoginProvider.doLogin();
+
+ if (loginUser.isFromKeytab()) {
+ String fileLocation =
+ System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION);
+ if (fileLocation != null) {
+ Credentials credentials =
+ Credentials.readTokenStorageFile(
+ new File(fileLocation), hadoopConfiguration);
+ loginUser.addCredentials(credentials);
}
-
- loginUser.addCredentials(credentialsToBeAdded);
- }
- } else {
- // login with current user credentials (e.g. ticket cache, OS login)
- // note that the stored tokens are read automatically
- try {
- // Use reflection API to get the login user object
- // UserGroupInformation.loginUserFromSubject(null);
- Method loginUserFromSubjectMethod =
- UserGroupInformation.class.getMethod(
- "loginUserFromSubject", Subject.class);
- loginUserFromSubjectMethod.invoke(null, (Subject) null);
Review Comment:
@steveloughran here is another similar question:
AFAIK `UserGroupInformation.loginUserFromSubject` does the same just like
```
ugi = UserGroupInformation.getUGIFromTicketCache
UserGroupInformation.setLoginUser(ugi);
```
right?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1293629423
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21160:
URL: https://github.com/apache/flink/pull/21160#issuecomment-1298412100
@flinkbot run azure
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1005425742
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java:
##########
@@ -69,71 +60,34 @@ public void install() throws SecurityInstallException {
UserGroupInformation loginUser;
try {
- if (UserGroupInformation.isSecurityEnabled()
- && !StringUtils.isBlank(securityConfig.getKeytab())
- && !StringUtils.isBlank(securityConfig.getPrincipal())) {
- String keytabPath = (new File(securityConfig.getKeytab())).getAbsolutePath();
-
- UserGroupInformation.loginUserFromKeytab(securityConfig.getPrincipal(), keytabPath);
Review Comment:
@steveloughran since you have quite some XP w/ UGI a quick question:
AFAIK `UserGroupInformation.loginUserFromKeytab` does the same just like
```
ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI
UserGroupInformation.setLoginUser(ugi);
```
right?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] steveloughran commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
steveloughran commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1005501511
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java:
##########
@@ -69,71 +60,34 @@ public void install() throws SecurityInstallException {
UserGroupInformation loginUser;
try {
- if (UserGroupInformation.isSecurityEnabled()
- && !StringUtils.isBlank(securityConfig.getKeytab())
- && !StringUtils.isBlank(securityConfig.getPrincipal())) {
- String keytabPath = (new File(securityConfig.getKeytab())).getAbsolutePath();
-
- UserGroupInformation.loginUserFromKeytab(securityConfig.getPrincipal(), keytabPath);
Review Comment:
yes, plus sets up a renewer thread to do relogin on a regular basis.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] gaborgsomogyi commented on a diff in pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on code in PR #21160:
URL: https://github.com/apache/flink/pull/21160#discussion_r1009383149
##########
flink-runtime/src/test/java/org/apache/flink/runtime/hadoop/HadoopUserUtilsITCasae.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.hadoop;
+
+import org.apache.hadoop.security.UserGroupInformation;
+import org.junit.jupiter.api.Test;
+import org.mockito.MockedStatic;
+
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.KERBEROS;
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.PROXY;
+import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.SIMPLE;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.mockStatic;
+import static org.mockito.Mockito.when;
+
+/** Unit tests for Hadoop user utils. */
+class HadoopUserUtilsITCasae {
Review Comment:
Fixed.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] mbalassi merged pull request #21160: [FLINK-29761][runtime][security] Simplify HadoopModule
Posted by GitBox <gi...@apache.org>.
mbalassi merged PR #21160:
URL: https://github.com/apache/flink/pull/21160
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org