You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2022/12/01 15:54:12 UTC

[GitHub] [knox] zeroflag opened a new pull request, #687: KNOX-2848: Prevent overwriting generated descriptors/providers

zeroflag opened a new pull request, #687:
URL: https://github.com/apache/knox/pull/687

   ## What changes were proposed in this pull request?
   
   pending
   
   ## How was this patch tested?
   
   pending
   
   


-- 
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: dev-unsubscribe@knox.apache.org

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


[GitHub] [knox] zeroflag commented on a diff in pull request #687: KNOX-2848: Prevent overwriting generated descriptors/providers

Posted by GitBox <gi...@apache.org>.
zeroflag commented on code in PR #687:
URL: https://github.com/apache/knox/pull/687#discussion_r1039663874


##########
gateway-service-admin/src/main/java/org/apache/knox/gateway/service/admin/TopologiesResource.java:
##########
@@ -424,6 +429,14 @@ public Response uploadSimpleDescriptor(@PathParam("name") String name,
     return response;
   }
 
+  private boolean existingGeneratedTopology(String fileName, TopologyService topologyService, GatewayConfig config) {
+    for (org.apache.knox.gateway.topology.Topology topology : topologyService.getTopologies()) {

Review Comment:
   We check if the topology is included in `config.getReadOnlyOverrideTopologyNames()`. There is an `isGenerated` flag in the topology as well, but at this point of the code, it is not yet populated. Therefore I check directly based on the config property.



-- 
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: dev-unsubscribe@knox.apache.org

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


[GitHub] [knox] zeroflag merged pull request #687: KNOX-2848: Prevent overwriting generated descriptors/providers

Posted by GitBox <gi...@apache.org>.
zeroflag merged PR #687:
URL: https://github.com/apache/knox/pull/687


-- 
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: dev-unsubscribe@knox.apache.org

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


[GitHub] [knox] smolnar82 commented on a diff in pull request #687: KNOX-2848: Prevent overwriting generated descriptors/providers

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on code in PR #687:
URL: https://github.com/apache/knox/pull/687#discussion_r1038248513


##########
gateway-service-admin/src/main/java/org/apache/knox/gateway/service/admin/TopologiesResource.java:
##########
@@ -424,6 +429,14 @@ public Response uploadSimpleDescriptor(@PathParam("name") String name,
     return response;
   }
 
+  private boolean existingGeneratedTopology(String fileName, TopologyService topologyService, GatewayConfig config) {
+    for (org.apache.knox.gateway.topology.Topology topology : topologyService.getTopologies()) {

Review Comment:
   I do not see where we check if the given topology is `readOnly`. This implementation will prevent creating/overwriting all topologies, won't it?



-- 
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: dev-unsubscribe@knox.apache.org

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