Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override ClientProperties.USE_PLAINTEXT_CONNECTION with env variable #4245

Closed
pabloromanelli opened this issue Apr 6, 2020 · 0 comments · Fixed by #4459
Closed

Override ClientProperties.USE_PLAINTEXT_CONNECTION with env variable #4245

pabloromanelli opened this issue Apr 6, 2020 · 0 comments · Fixed by #4459
Assignees
Labels
kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog

Comments

@pabloromanelli
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When ClientProperties.USE_PLAINTEXT_CONNECTION is defined, it can't be disabled with a false value because ZeebeClientBuilderImpl#withProperties doesn't care about the value:

public ZeebeClientBuilder withProperties(final Properties properties) {
//...
    if (properties.containsKey(USE_PLAINTEXT_CONNECTION)) {
      usePlaintext();
    }

I'm using Docker containers, it is easier to add env variables to override configuration but not the opposite.

Describe the solution you'd like

Make USE_PLAINTEXT_CONNECTION a boolean variable and only call usePlaintext() if it is true.

Describe alternatives you've considered

Currently I'm forcing it with ZEEBE_INSECURE_CONNECTION=false, but it would be better to always use the same env variable.

@pabloromanelli pabloromanelli added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Apr 6, 2020
@npepinpe npepinpe added Priority: Low scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog labels May 5, 2020
@pihme pihme self-assigned this May 5, 2020
zeebe-bors bot added a commit that referenced this issue May 11, 2020
4459: fix(clients/java): parse USE_PLAINTEXT_CONNECTION as boolean r=saig0 a=pihme

## Description

Changes behavior of `USE_PLAINTEXT_CONNECTION` flag; If it is explicitly set to `false`, it won't be applied.

## Related issues

closes #4245

#

Co-authored-by: pihme <pihme@users.noreply.github.com>
zeebe-bors bot added a commit that referenced this issue May 11, 2020
4459: fix(clients/java): parse USE_PLAINTEXT_CONNECTION as boolean r=saig0 a=pihme

## Description

Changes behavior of `USE_PLAINTEXT_CONNECTION` flag; If it is explicitly set to `false`, it won't be applied.

## Related issues

closes #4245

#

Co-authored-by: pihme <pihme@users.noreply.github.com>
zeebe-bors bot added a commit that referenced this issue May 11, 2020
4459: fix(clients/java): parse USE_PLAINTEXT_CONNECTION as boolean r=saig0 a=pihme

## Description

Changes behavior of `USE_PLAINTEXT_CONNECTION` flag; If it is explicitly set to `false`, it won't be applied.

## Related issues

closes #4245

#

Co-authored-by: pihme <pihme@users.noreply.github.com>
@zeebe-bors zeebe-bors bot closed this as completed in 9e1f0d2 May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants