You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by GitBox <gi...@apache.org> on 2022/03/08 12:45:06 UTC
[GitHub] [incubator-linkis] silly-carbon opened a new pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
silly-carbon opened a new pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635
This PR is based on https://github.com/apache/incubator-linkis/pull/556
If we share a dashboard of Visualis in the normal way(no login required, as defined by Visualis), anonymous users would not be able to visit this shared URL because Linkis gateway would filter this URL out, don't let it pass, and this dashboard can never be really shared this way.
That's not what was intended to be.
This BUG is fixed in this PR. With REGEX Support.
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] silly-carbon closed pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
silly-carbon closed pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] silly-carbon commented on a change in pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
silly-carbon commented on a change in pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#discussion_r821678785
##########
File path: linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/config/GatewayConfiguration.scala
##########
@@ -63,4 +63,7 @@ object GatewayConfiguration {
val DSS_QUERY_WORKSPACE_SERVICE_NAME = CommonVars("wds.dss.query.workspace.service", "dss-framework-project-server")
val USER_WORKSPACE_REFLESH_TIME = CommonVars("wds.linkis.user.workspace.reflesh.time", 10)
+
+ // Use regex to match against URLs, if matched, let them pass anyway(even if not currently logged in)
+ val GATEWAY_NO_AUTH_URL_REGEX = CommonVars("wds.linkis.gateway.no.auth.url.regex", ".*visualis.*share.*")
Review comment:
With "()" and "|" you can express the "OR" relation in REGEX, for instance:
(.*visualis.*|.*dss.*) will MATCH URLs containing visualis OR dss, the following URLS with be matched:
1. http://linkis.org/jd/visualis/vis
2. http://linkis.org/jd/dss/vis
Other URLs will NOT be matched.
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong commented on a change in pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
peacewong commented on a change in pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#discussion_r821661353
##########
File path: linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/config/GatewayConfiguration.scala
##########
@@ -63,4 +63,7 @@ object GatewayConfiguration {
val DSS_QUERY_WORKSPACE_SERVICE_NAME = CommonVars("wds.dss.query.workspace.service", "dss-framework-project-server")
val USER_WORKSPACE_REFLESH_TIME = CommonVars("wds.linkis.user.workspace.reflesh.time", 10)
+
+ // Use regex to match against URLs, if matched, let them pass anyway(even if not currently logged in)
+ val GATEWAY_NO_AUTH_URL_REGEX = CommonVars("wds.linkis.gateway.no.auth.url.regex", ".*visualis.*share.*")
Review comment:
> Not sure if I understand your meaning. Because REGEX already supported the OR relation(So you could match against multiple URLs with just one pattern), which eliminated the need for "configuring multiple regulars"
>
> Could you provide some examples?
Yes, that's what it means, you can provide an example in the comments
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] silly-carbon commented on pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
silly-carbon commented on pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#issuecomment-1061739844
@peacewong Please see this PR
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong commented on pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
peacewong commented on pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#issuecomment-1061759384
> @peacewong Please see this PR
ok. Thanks
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong commented on pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
peacewong commented on pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#issuecomment-1061765967
Hello, can you help submit it to the dev-1.1.0-datasource branch, which will be released soon
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] silly-carbon commented on a change in pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
silly-carbon commented on a change in pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#discussion_r821659340
##########
File path: linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/config/GatewayConfiguration.scala
##########
@@ -63,4 +63,7 @@ object GatewayConfiguration {
val DSS_QUERY_WORKSPACE_SERVICE_NAME = CommonVars("wds.dss.query.workspace.service", "dss-framework-project-server")
val USER_WORKSPACE_REFLESH_TIME = CommonVars("wds.linkis.user.workspace.reflesh.time", 10)
+
+ // Use regex to match against URLs, if matched, let them pass anyway(even if not currently logged in)
+ val GATEWAY_NO_AUTH_URL_REGEX = CommonVars("wds.linkis.gateway.no.auth.url.regex", ".*visualis.*share.*")
Review comment:
Not sure if I understand your meaning. Because REGEX already supported the OR relation(So you could match against multiple URLs with just one pattern), which eliminated the need for "configuring multiple regulars"
Could you provide some examples?
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong commented on a change in pull request #1635: [Feature] Use regex to match against gateway URLs, if matched, let them pass
Posted by GitBox <gi...@apache.org>.
peacewong commented on a change in pull request #1635:
URL: https://github.com/apache/incubator-linkis/pull/1635#discussion_r821650822
##########
File path: linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/config/GatewayConfiguration.scala
##########
@@ -63,4 +63,7 @@ object GatewayConfiguration {
val DSS_QUERY_WORKSPACE_SERVICE_NAME = CommonVars("wds.dss.query.workspace.service", "dss-framework-project-server")
val USER_WORKSPACE_REFLESH_TIME = CommonVars("wds.linkis.user.workspace.reflesh.time", 10)
+
+ // Use regex to match against URLs, if matched, let them pass anyway(even if not currently logged in)
+ val GATEWAY_NO_AUTH_URL_REGEX = CommonVars("wds.linkis.gateway.no.auth.url.regex", ".*visualis.*share.*")
Review comment:
Hello, is it better to consider configuring multiple regulars?
--
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@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org