syndesisio / syndesis-rest

The API for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis-staging.b6ff.rh-idev.openshiftapps.com/api/v1/
Apache License 2.0
6 stars 17 forks source link

Generated function.yaml configures endpoint parameters that are secrets #322

Closed chirino closed 7 years ago

chirino commented 7 years ago

Example:

uri: twitter-mention:?accessToken=&accessTokenSecret=&consumerKey=&consumerSecret=

Shouldn't stuff like consumerSecret come in via application.properties via secrets?

iocanel commented 7 years ago

Any connector property that has the secret flag set to true, may be present in uri using a placeholder, that picks up value from /opt/integration/secrets.properties.

If the actual value is present in the uri, then its a bug.

@chirino: from the description its not clear to me what exactly is the problem.

davsclaus commented 7 years ago

No those should be configure from spring-boot, eg like in that application.properties file

davsclaus commented 7 years ago

The camel uri should just be twitter-mention just like the example https://github.com/redhat-ipaas/connectors/blob/master/examples/twitter-salesforce-example/src/main/java/com/redhat/ipaas/example/MentionAddContractRoute.java#L26

davsclaus commented 7 years ago

Whatever magic @iocanel then has to load that /opt/integration/secrets.properties file and make those as spring boot auto configuration is beyond my scope/knowledge. All Camel care about is that its configured using spring boot auto configuration, eg

https://github.com/redhat-ipaas/connectors/blob/master/connectors/twitter-mention-connector/src/main/java/com/redhat/ipaas/connector/twitter/springboot/TwitterMentionConnectorConfiguration.java

https://github.com/redhat-ipaas/connectors/blob/master/connectors/twitter-mention-connector/src/main/java/com/redhat/ipaas/connector/twitter/springboot/TwitterMentionConnectorAutoConfiguration.java

chirino commented 7 years ago

Fixed now