pivotal-jbarrett commented on a change in pull request #6721:
URL: https://github.com/apache/geode/pull/6721#discussion_r678545031



##########
File path: 
geode-core/src/main/java/org/apache/geode/cache/client/internal/OpExecutorImpl.java
##########
@@ -759,7 +760,8 @@ private Object 
executeWithPossibleReAuthentication(Connection conn, Op op) throw
       Throwable cause = sce.getCause();
       if ((cause instanceof AuthenticationRequiredException
           && "User authorization attributes not 
found.".equals(cause.getMessage()))
-          || sce.getMessage().contains("Connection error while authenticating 
user")) {
+          || sce.getMessage().contains("Connection error while authenticating 
user")
+          || cause instanceof AuthenticationExpiredException) {
         // (ashetkar) Need a cleaner way of doing above check.

Review comment:
       Remove the name. Is this todo style comment even relevant anymore?

##########
File path: 
geode-core/src/main/java/org/apache/geode/security/SecurityManager.java
##########
@@ -74,6 +74,8 @@ default void init(Properties securityProps) {}
    * @param principal The principal that's requesting the permission
    * @param permission The permission requested
    * @return true if authorized, false if not
+   *
+   *         possibly throw AuthenticationExpiredException

Review comment:
       Formatting.
   
   Why not list it as a "checked exception". Then use the `@throws` tag to 
document it.

##########
File path: 
geode-core/src/main/java/org/apache/geode/security/AuthenticationExpiredException.java
##########
@@ -0,0 +1,32 @@
+/*
+ * 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.geode.security;
+
+/**
+ * This exception is thrown by the SecurityManager's authorize method to 
indicate that the
+ * authentication has expired

Review comment:
       'has expired.'

##########
File path: 
geode-core/src/integrationTest/java/org/apache/geode/management/internal/security/SecurityWithExpirationIniIntegrationTest.java
##########
@@ -0,0 +1,66 @@
+/*
+ * 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.geode.management.internal.security;
+
+import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.security.SecurityServiceFactory;
+import org.apache.geode.security.AuthenticationExpiredException;
+import org.apache.geode.security.ExpirableSecurityManager;
+import org.apache.geode.test.junit.categories.SecurityTest;
+
+@Category({SecurityTest.class})
+public class SecurityWithExpirationIniIntegrationTest {

Review comment:
       `SecurityWithExpirationIni`, what is `Ini`?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to