Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

feat(zeebe-plugin): persist endpoints and deployment config separately #197

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

pinussilvestrus
Copy link
Contributor

@pinussilvestrus pinussilvestrus commented Apr 3, 2020

Create separate config places for per-file deployment configuration and zeebe endpoints.

Closes #190

@pinussilvestrus pinussilvestrus marked this pull request as ready for review April 6, 2020 06:16
Copy link
Contributor

@barmac barmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested this and it seems we save some excess data. See my configuration:

  "zeebeEndpoints": [
    {
      "audience": "2HyJ1Fzkl5m8JjvEo3PYV6RAonIX8atx.zeebe.camunda.io",
      "camundaCloudClientId": "2HyJ1Fzkl5m8JjvEo3PYV6RAonIX8atx",
      "camundaCloudClientSecret": "REDACTED BY MACIEJ, BUT THERE WAS A SECRET",
      "camundaCloudClusterId": "a04ae7d0-0159-4872-9bb5-540ad31fa324",
      "connectionMethod": "oauth",
      "id": "0acnsjn",
      "oauthClientId": "2HyJ1Fzkl5m8JjvEo3PYV6RAonIX8atx",
      "oauthClientSecret": "REDACTED BY MACIEJ, BUT THERE WAS A SECRET",
      "oauthURL": "https://login.cloud.camunda.io/oauth/token",
      "rememberCredentials": true,
      "zeebeContactPointOauth": "a04ae7d0-0159-4872-9bb5-540ad31fa324.zeebe.camunda.io:443",
      "zeebeContactpointSelfHosted": "0.0.0.0:26500"
    },
    {
      "audience": "",
      "camundaCloudClusterId": "",
      "connectionMethod": "selfHosted",
      "id": "0ow80ro",
      "oauthURL": "",
      "rememberCredentials": false,
      "zeebeContactPointOauth": "",
      "zeebeContactpointSelfHosted": "0.0.0.0:26500"
    },
    {
      "audience": "",
      "camundaCloudClientId": "2HyJ1Fzkl5m8JjvEo3PYV6RAonIX8atx",
      "camundaCloudClientSecret": "REDACTED BY MACIEJ, BUT THERE WAS A SECRET",
      "camundaCloudClusterId": "a04ae7d0-0159-4872-9bb5-540ad31fa324",
      "connectionMethod": "camundaCloud",
      "id": "0913u4d",
      "oauthClientId": "",
      "oauthClientSecret": "",
      "oauthURL": "",
      "rememberCredentials": true,
      "zeebeContactPointOauth": "",
      "zeebeContactpointSelfHosted": "0.0.0.0:26500"
    },
    {
      "audience": "2HyJ1Fzkl5m8JjvEo3PYV6RAonIX8atx.zeebe.camunda.io",
      "camundaCloudClusterId": "",
      "connectionMethod": "oauth",
      "id": "1wcd6gw",
      "oauthURL": "https://login.cloud.camunda.io/oauth/token",
      "rememberCredentials": false,
      "zeebeContactPointOauth": "a04ae7d0-0159-4872-9bb5-540ad31fa324.zeebe.camunda.io:443",
      "zeebeContactpointSelfHosted": "0.0.0.0:26500"
    }
  ]

@barmac
Copy link
Contributor

barmac commented Apr 6, 2020

So in the first case the config contains both OAuth and Camunda Cloud secrets. Also, the zeebeContactPointSelfHosted is always saved.

@pinussilvestrus
Copy link
Contributor Author

I see. That's because we save the whole endpoint configuration no matter which connection type is chosen. That's not particularly an issue that comes with this PR, right? (cf. original state)

Would it be the expected behavior that I only save the endpoint configuration of the chosen connection type? If yes, we can fix that with that PR as well or simply open another issue for that.

@barmac
Copy link
Contributor

barmac commented Apr 6, 2020

So I'd expect that we save only a single endpoint configuration, which is its method and its data, but no other endpoint's data. I'm OK with if you open another issue, just let me know.

@pinussilvestrus
Copy link
Contributor Author

Let's open another issue for that and handle that separately.

@barmac barmac self-requested a review April 6, 2020 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle Endpoint Configuration the same way as in Camunda Modeler
2 participants