This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6085e3d94567c8847a7a1ef9b4ba882c0431d01f Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue May 12 09:22:41 2020 +0200 CAMEL-15050: Templating components - Variable map to be limited to body/headers --- .../RobotFrameworkComponentConfigurer.java | 5 + .../RobotFrameworkEndpointConfigurer.java | 5 + .../component/robotframework/robotframework.json | 2 + .../src/main/docs/robotframework-component.adoc | 6 +- .../RobotFrameworkCamelConfiguration.java | 17 ++++ .../robotframework/RobotFrameworkCamelUtils.java | 4 +- .../robotframework/RobotFrameworkComponent.java | 14 +++ .../robotframework/RobotFrameworkEndpoint.java | 12 ++- .../RobotFrameworkCamelUtilsTest.java | 3 +- .../RobotFrameworkComponentTest.java | 2 +- .../dsl/RobotframeworkComponentBuilderFactory.java | 18 ++++ .../dsl/RobotFrameworkEndpointBuilderFactory.java | 102 +++++++++++++++++++++ 12 files changed, 183 insertions(+), 7 deletions(-) diff --git a/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkComponentConfigurer.java b/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkComponentConfigurer.java index 1992a82..8208586 100644 --- a/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkComponentConfigurer.java +++ b/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkComponentConfigurer.java @@ -26,6 +26,8 @@ public class RobotFrameworkComponentConfigurer extends PropertyConfigurerSupport public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { RobotFrameworkComponent target = (RobotFrameworkComponent) obj; switch (ignoreCase ? name.toLowerCase() : name) { + case "allowcontextmapall": + case "allowContextMapAll": getOrCreateConfiguration(target).setAllowContextMapAll(property(camelContext, boolean.class, value)); return true; case "allowtemplatefromheader": case "allowTemplateFromHeader": getOrCreateConfiguration(target).setAllowTemplateFromHeader(property(camelContext, boolean.class, value)); return true; case "argumentfile": @@ -116,6 +118,7 @@ public class RobotFrameworkComponentConfigurer extends PropertyConfigurerSupport @Override public Map<String, Object> getAllOptions(Object target) { Map<String, Object> answer = new CaseInsensitiveMap(); + answer.put("allowContextMapAll", boolean.class); answer.put("allowTemplateFromHeader", boolean.class); answer.put("argumentFile", java.io.File.class); answer.put("basicPropertyBinding", boolean.class); @@ -173,6 +176,8 @@ public class RobotFrameworkComponentConfigurer extends PropertyConfigurerSupport public Object getOptionValue(Object obj, String name, boolean ignoreCase) { RobotFrameworkComponent target = (RobotFrameworkComponent) obj; switch (ignoreCase ? name.toLowerCase() : name) { + case "allowcontextmapall": + case "allowContextMapAll": return getOrCreateConfiguration(target).isAllowContextMapAll(); case "allowtemplatefromheader": case "allowTemplateFromHeader": return getOrCreateConfiguration(target).isAllowTemplateFromHeader(); case "argumentfile": diff --git a/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkEndpointConfigurer.java b/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkEndpointConfigurer.java index 79b32fd..55b3d91 100644 --- a/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkEndpointConfigurer.java +++ b/components/camel-robotframework/src/generated/java/org/apache/camel/component/robotframework/RobotFrameworkEndpointConfigurer.java @@ -19,6 +19,8 @@ public class RobotFrameworkEndpointConfigurer extends PropertyConfigurerSupport public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { RobotFrameworkEndpoint target = (RobotFrameworkEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { + case "allowcontextmapall": + case "allowContextMapAll": target.getConfiguration().setAllowContextMapAll(property(camelContext, boolean.class, value)); return true; case "allowtemplatefromheader": case "allowTemplateFromHeader": target.getConfiguration().setAllowTemplateFromHeader(property(camelContext, boolean.class, value)); return true; case "argumentfile": @@ -144,6 +146,7 @@ public class RobotFrameworkEndpointConfigurer extends PropertyConfigurerSupport @Override public Map<String, Object> getAllOptions(Object target) { Map<String, Object> answer = new CaseInsensitiveMap(); + answer.put("allowContextMapAll", boolean.class); answer.put("allowTemplateFromHeader", boolean.class); answer.put("argumentFile", java.io.File.class); answer.put("backoffErrorThreshold", int.class); @@ -220,6 +223,8 @@ public class RobotFrameworkEndpointConfigurer extends PropertyConfigurerSupport public Object getOptionValue(Object obj, String name, boolean ignoreCase) { RobotFrameworkEndpoint target = (RobotFrameworkEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { + case "allowcontextmapall": + case "allowContextMapAll": return target.getConfiguration().isAllowContextMapAll(); case "allowtemplatefromheader": case "allowTemplateFromHeader": return target.getConfiguration().isAllowTemplateFromHeader(); case "argumentfile": diff --git a/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json b/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json index 5575b9e..6018dd8 100644 --- a/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json +++ b/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json @@ -21,6 +21,7 @@ "lenientProperties": false }, "componentProperties": { + "allowContextMapAll": { "kind": "property", "displayName": "Allow Context Map All", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Sets whether the context map should allow access to all details. By default only the message [...] "allowTemplateFromHeader": { "kind": "property", "displayName": "Allow Template From Header", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Whether to allow to use resource template from header or not (default false). Enabl [...] "argumentFile": { "kind": "property", "displayName": "Argument File", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.io.File", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "A text file to read more arguments from." }, "combinedTagStats": { "kind": "property", "displayName": "Combined Tag Stats", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Creates combined statistics based on tags. Use the format tags:title List" }, @@ -74,6 +75,7 @@ }, "properties": { "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will call a method on a be [...] + "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Sets whether the context map should allow access to all details. By default only the message [...] "allowTemplateFromHeader": { "kind": "parameter", "displayName": "Allow Template From Header", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Whether to allow to use resource template from header or not (default false). Enab [...] "argumentFile": { "kind": "parameter", "displayName": "Argument File", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.io.File", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "A text file to read more arguments from." }, "combinedTagStats": { "kind": "parameter", "displayName": "Combined Tag Stats", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Creates combined statistics based on tags. Use the format tags:title List" }, diff --git a/components/camel-robotframework/src/main/docs/robotframework-component.adoc b/components/camel-robotframework/src/main/docs/robotframework-component.adoc index b6afcd8..a46a547 100644 --- a/components/camel-robotframework/src/main/docs/robotframework-component.adoc +++ b/components/camel-robotframework/src/main/docs/robotframework-component.adoc @@ -51,13 +51,14 @@ You can append query options to the URI in the following format, === Options // component options: START -The Robot Framework component supports 50 options, which are listed below. +The Robot Framework component supports 51 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type +| *allowContextMapAll* (common) | Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the full power of CamelContext API. | false | boolean | *allowTemplateFromHeader* (common) | Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the header is coming from a malicious user, so use this with care. | false | boolean | *argumentFile* (common) | A text file to read more arguments from. | | File | *combinedTagStats* (common) | Creates combined statistics based on tags. Use the format tags:title List | | String @@ -131,12 +132,13 @@ with the following path and query parameters: |=== -=== Query Parameters (69 parameters): +=== Query Parameters (70 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type +| *allowContextMapAll* (common) | Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the full power of CamelContext API. | false | boolean | *allowTemplateFromHeader* (common) | Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the header is coming from a malicious user, so use this with care. | false | boolean | *argumentFile* (common) | A text file to read more arguments from. | | File | *combinedTagStats* (common) | Creates combined statistics based on tags. Use the format tags:title List | | String diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConfiguration.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConfiguration.java index 529d78b..e6c8f3f 100644 --- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConfiguration.java +++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConfiguration.java @@ -163,6 +163,9 @@ public class RobotFrameworkCamelConfiguration implements Cloneable { @UriParam(defaultValue = "false") private boolean allowTemplateFromHeader; + @UriParam(defaultValue = "false") + private boolean allowContextMapAll; + public String getName() { return name; } @@ -709,6 +712,20 @@ public class RobotFrameworkCamelConfiguration implements Cloneable { this.allowTemplateFromHeader = allowTemplateFromHeader; } + public boolean isAllowContextMapAll() { + return allowContextMapAll; + } + + /** + * Sets whether the context map should allow access to all details. + * By default only the message body and headers can be accessed. + * This option can be enabled for full access to the current Exchange and CamelContext. + * Doing so impose a potential security risk as this opens access to the full power of CamelContext API. + */ + public void setAllowContextMapAll(boolean allowContextMapAll) { + this.allowContextMapAll = allowContextMapAll; + } + public RobotFrameworkCamelConfiguration copy() { try { return (RobotFrameworkCamelConfiguration)super.clone(); diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtils.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtils.java index 9dcb23e..858c5c2 100644 --- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtils.java +++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtils.java @@ -42,8 +42,8 @@ public final class RobotFrameworkCamelUtils { } @SuppressWarnings("unchecked") - public static List<String> createRobotVariablesFromCamelExchange(Exchange exchange) throws TypeConversionException, NoTypeConversionAvailableException { - Map<String, Object> variablesMap = ExchangeHelper.createVariableMap(exchange); + public static List<String> createRobotVariablesFromCamelExchange(Exchange exchange, boolean allowContextMapAll) throws TypeConversionException, NoTypeConversionAvailableException { + Map<String, Object> variablesMap = ExchangeHelper.createVariableMap(exchange, allowContextMapAll); List<String> variableKeyValuePairList = new ArrayList<>(); for (Map.Entry<String, Object> variableEntry : variablesMap.entrySet()) { if (ROBOT_VAR_CAMEL_BODY.equals(variableEntry.getKey())) { diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkComponent.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkComponent.java index 769b850..87a1c69 100644 --- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkComponent.java +++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkComponent.java @@ -64,6 +64,20 @@ public class RobotFrameworkComponent extends DefaultComponent { configuration.setAllowTemplateFromHeader(allowTemplateFromHeader); } + public boolean isAllowContextMapAll() { + return configuration.isAllowContextMapAll(); + } + + /** + * Sets whether the context map should allow access to all details. + * By default only the message body and headers can be accessed. + * This option can be enabled for full access to the current Exchange and CamelContext. + * Doing so impose a potential security risk as this opens access to the full power of CamelContext API. + */ + public void setAllowContextMapAll(boolean allowContextMapAll) { + configuration.setAllowContextMapAll(allowContextMapAll); + } + protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { final RobotFrameworkCamelConfiguration configuration = this.configuration.copy(); diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java index 37b5c44..d421697 100644 --- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java +++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java @@ -57,6 +57,16 @@ public class RobotFrameworkEndpoint extends ResourceEndpoint { } @Override + public boolean isAllowContextMapAll() { + return configuration.isAllowContextMapAll(); + } + + @Override + public void setAllowContextMapAll(boolean allowContextMapAll) { + configuration.setAllowContextMapAll(allowContextMapAll); + } + + @Override protected void onExchange(Exchange exchange) throws Exception { // create robot arguments to pass RobotFrameworkArguments generatedArguments = new RobotFrameworkArguments(); @@ -102,7 +112,7 @@ public class RobotFrameworkEndpoint extends ResourceEndpoint { generatedArguments.addListToArguments(Arrays.asList((configuration.getNonCriticalTags() != null ? configuration.getNonCriticalTags() : "").split(",")), "-n"); // create variables from camel exchange to pass into robot - List<String> variables = RobotFrameworkCamelUtils.createRobotVariablesFromCamelExchange(exchange); + List<String> variables = RobotFrameworkCamelUtils.createRobotVariablesFromCamelExchange(exchange, isAllowContextMapAll()); exchange.getIn().setHeader(RobotFrameworkCamelConstants.CAMEL_ROBOT_VARIABLES, variables); generatedArguments.addListToArguments(variables, "-v"); diff --git a/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtilsTest.java b/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtilsTest.java index 7862bc3..638b44a 100644 --- a/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtilsTest.java +++ b/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkCamelUtilsTest.java @@ -118,7 +118,8 @@ public class RobotFrameworkCamelUtilsTest extends CamelTestSupport { return new RouteBuilder() { public void configure() { from("direct:setVariableCamelExchange") - .to("robotframework:src/test/resources/org/apache/camel/component/robotframework/set_variable_camel_exchange.robot?xunitFile=target/out.xml&outputDirectory=target") + .to("robotframework:src/test/resources/org/apache/camel/component/robotframework/set_variable_camel_exchange.robot?" + + "xunitFile=target/out.xml&outputDirectory=target&allowContextMapAll=true") .to("mock:result"); } }; diff --git a/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkComponentTest.java b/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkComponentTest.java index f6f03b0..4f1ab51 100644 --- a/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkComponentTest.java +++ b/components/camel-robotframework/src/test/java/org/apache/camel/component/robotframework/RobotFrameworkComponentTest.java @@ -130,7 +130,7 @@ public class RobotFrameworkComponentTest extends CamelTestSupport { from("direct:setVariableCamelBodyAndHeader").to("robotframework:src/test/resources/org/apache/camel/component/robotframework/set_variable_camel_header.robot?xunitFile=target/out.xml") .to("mock:resultHeader"); - from("direct:setVariableCamelBodyAndProperty").to("robotframework:src/test/resources/org/apache/camel/component/robotframework/set_variable_camel_property.robot?xunitFile=target/out.xml") + from("direct:setVariableCamelBodyAndProperty").to("robotframework:src/test/resources/org/apache/camel/component/robotframework/set_variable_camel_property.robot?xunitFile=target/out.xml&allowContextMapAll=true") .to("mock:resultProperty"); from("direct:setVariableCamelBodyResourceUri") diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RobotframeworkComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RobotframeworkComponentBuilderFactory.java index bd55337..d267e42 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RobotframeworkComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RobotframeworkComponentBuilderFactory.java @@ -49,6 +49,23 @@ public interface RobotframeworkComponentBuilderFactory { extends ComponentBuilder<RobotFrameworkComponent> { /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotframeworkComponentBuilder allowContextMapAll( + boolean allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** * Whether to allow to use resource template from header or not (default * false). Enabling this allows to specify dynamic templates via message * header. However this can be seen as a potential security @@ -713,6 +730,7 @@ public interface RobotframeworkComponentBuilderFactory { String name, Object value) { switch (name) { + case "allowContextMapAll": getOrCreateConfiguration((RobotFrameworkComponent) component).setAllowContextMapAll((boolean) value); return true; case "allowTemplateFromHeader": getOrCreateConfiguration((RobotFrameworkComponent) component).setAllowTemplateFromHeader((boolean) value); return true; case "argumentFile": getOrCreateConfiguration((RobotFrameworkComponent) component).setArgumentFile((java.io.File) value); return true; case "combinedTagStats": getOrCreateConfiguration((RobotFrameworkComponent) component).setCombinedTagStats((java.lang.String) value); return true; diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RobotFrameworkEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RobotFrameworkEndpointBuilderFactory.java index dad73e1..728371c 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RobotFrameworkEndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RobotFrameworkEndpointBuilderFactory.java @@ -48,6 +48,40 @@ public interface RobotFrameworkEndpointBuilderFactory { return (AdvancedRobotFrameworkEndpointConsumerBuilder) this; } /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointConsumerBuilder allowContextMapAll( + boolean allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointConsumerBuilder allowContextMapAll( + String allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** * Whether to allow to use resource template from header or not (default * false). Enabling this allows to specify dynamic templates via message * header. However this can be seen as a potential security @@ -1450,6 +1484,40 @@ public interface RobotFrameworkEndpointBuilderFactory { return (AdvancedRobotFrameworkEndpointProducerBuilder) this; } /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointProducerBuilder allowContextMapAll( + boolean allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointProducerBuilder allowContextMapAll( + String allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** * Whether to allow to use resource template from header or not (default * false). Enabling this allows to specify dynamic templates via message * header. However this can be seen as a potential security @@ -2368,6 +2436,40 @@ public interface RobotFrameworkEndpointBuilderFactory { return (AdvancedRobotFrameworkEndpointBuilder) this; } /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointBuilder allowContextMapAll( + boolean allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** + * Sets whether the context map should allow access to all details. By + * default only the message body and headers can be accessed. This + * option can be enabled for full access to the current Exchange and + * CamelContext. Doing so impose a potential security risk as this opens + * access to the full power of CamelContext API. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: common + */ + default RobotFrameworkEndpointBuilder allowContextMapAll( + String allowContextMapAll) { + doSetProperty("allowContextMapAll", allowContextMapAll); + return this; + } + /** * Whether to allow to use resource template from header or not (default * false). Enabling this allows to specify dynamic templates via message * header. However this can be seen as a potential security