You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/08 09:36:42 UTC

[GitHub] [incubator-inlong] wardlican opened a new pull request #3004: [INLONG-2854][Manager]support inlong manager to use other plugin of A…

wardlican opened a new pull request #3004:
URL: https://github.com/apache/incubator-inlong/pull/3004


   [INLONG-2854][Manager]support inlong manager to use other plugin of Authentication
   
   
   ### Title Name: [INLONG-2854][Manager]support inlong manager to use other plugin of Authentication
   
   where *XYZ* should be replaced by the actual issue number.
   
   Fixes #2854
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-inlong] healchow merged pull request #3004: [INLONG-2854][Manager] Support other plugin of authentication

Posted by GitBox <gi...@apache.org>.
healchow merged pull request #3004:
URL: https://github.com/apache/incubator-inlong/pull/3004


   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-inlong] wardlican commented on a change in pull request #3004: [INLONG-2854][Manager] Support other plugin of authentication

Posted by GitBox <gi...@apache.org>.
wardlican commented on a change in pull request #3004:
URL: https://github.com/apache/incubator-inlong/pull/3004#discussion_r823334453



##########
File path: inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/impl/InLongShiroImpl.java
##########
@@ -0,0 +1,97 @@
+/*
+ * 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.inlong.manager.web.auth.impl;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import javax.servlet.Filter;
+import org.apache.inlong.manager.common.auth.InLongShiro;
+import org.apache.inlong.manager.service.core.UserService;
+import org.apache.inlong.manager.web.auth.AuthenticationFilter;
+import org.apache.inlong.manager.web.auth.WebAuthorizingRealm;
+import org.apache.shiro.authc.credential.CredentialsMatcher;
+import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
+import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.apache.shiro.web.mgt.WebSecurityManager;
+import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.session.mgt.WebSessionManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+@ConditionalOnProperty(name = "type", prefix = "inlong.auth", havingValue = "default")
+@Component
+public class InLongShiroImpl implements InLongShiro {

Review comment:
       OK,I will change to "InlongShiroImpl" and "InlongShiro"

##########
File path: inlong-manager/manager-web/src/main/resources/application.properties
##########
@@ -16,35 +16,32 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-

Review comment:
       ok 




-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-inlong] healchow commented on a change in pull request #3004: [INLONG-2854][Manager] Support other plugin of authentication

Posted by GitBox <gi...@apache.org>.
healchow commented on a change in pull request #3004:
URL: https://github.com/apache/incubator-inlong/pull/3004#discussion_r823331500



##########
File path: inlong-manager/manager-web/src/main/resources/application.properties
##########
@@ -16,35 +16,32 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-

Review comment:
       Please do not remove those blank line.

##########
File path: inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/impl/InLongShiroImpl.java
##########
@@ -0,0 +1,97 @@
+/*
+ * 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.inlong.manager.web.auth.impl;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import javax.servlet.Filter;
+import org.apache.inlong.manager.common.auth.InLongShiro;
+import org.apache.inlong.manager.service.core.UserService;
+import org.apache.inlong.manager.web.auth.AuthenticationFilter;
+import org.apache.inlong.manager.web.auth.WebAuthorizingRealm;
+import org.apache.shiro.authc.credential.CredentialsMatcher;
+import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
+import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.apache.shiro.web.mgt.WebSecurityManager;
+import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.session.mgt.WebSessionManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+@ConditionalOnProperty(name = "type", prefix = "inlong.auth", havingValue = "default")
+@Component
+public class InLongShiroImpl implements InLongShiro {

Review comment:
       Please change the class name to `InlongShiroImpl` and `InlongShiro`.




-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org