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

Added support for canCopy and canDownloadCsv server properties #904

Merged

Conversation

Zhou-Ziheng
Copy link
Contributor

@Zhou-Ziheng Zhou-Ziheng commented Nov 28, 2022

Manually tested for three scenarios:

  1. server values of canCopy and canDownloadCsv being false
  2. server values of canCopy and canDownloadCsv being true
  3. server does not provide values for canCopy and canDownloadCsv

Usage:
docker-compose.yml:

version: "3.4"

services:
  deephaven:
    image: ghcr.io/deephaven/server:latest
    ports:
      - "${DEEPHAVEN_PORT:-10000}:10000"
    volumes:
      - ./data:/data
      - ./deephaven.prop:/opt/deephaven/config/deephaven.prop:ro
    environment:
      - START_OPTS=-Xmx4g

deephaven.prop:

includefiles=dh-defaults.prop

internal.webClient.appInit.canCopy=false
internal.webClient.appInit.canDownloadCsv=false

client.configuration.list=java.version,deephaven.version,barrage.version,internal.webClient.appInit.canCopy,internal.webClient.appInit.canDownloadCsv,

@Zhou-Ziheng Zhou-Ziheng added the enhancement New feature or request label Nov 28, 2022
@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed November 28, 2022 23:53
@Zhou-Ziheng Zhou-Ziheng self-assigned this Nov 28, 2022
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #904 (6cd673b) into main (6fe7883) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main     #904   +/-   ##
=======================================
  Coverage   37.74%   37.74%           
=======================================
  Files         410      410           
  Lines       31101    31101           
  Branches     7751     7751           
=======================================
  Hits        11740    11740           
  Misses      19306    19306           
  Partials       55       55           
Flag Coverage Δ
unit 37.74% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/code-studio/src/main/AppInit.tsx 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

Can you include in the PR description how you configured the server with those values? Can be a link to documentation.

I'm assuming @devinrsmith named these config values and approves of the names?

@devinrsmith
Copy link
Member

There are a lot of different ways to setup configuration, but this is the method I think @Zhou-Ziheng used:

docker-compose.yml:

version: "3.4"

services:
  deephaven:
    image: ghcr.io/deephaven/server:latest
    ports:
      - "${DEEPHAVEN_PORT:-10000}:10000"
    volumes:
      - ./data:/data
      - ./deephaven.prop:/opt/deephaven/config/deephaven.prop:ro
    environment:
      - START_OPTS=-Xmx4g

deephaven.prop:

includefiles=dh-defaults.prop

internal.webClient.appInit.canCopy=false
internal.webClient.appInit.canDownloadCsv=false

client.configuration.list=java.version,deephaven.version,barrage.version,internal.webClient.appInit.canCopy,internal.webClient.appInit.canDownloadCsv,

It's a bit fragile the way client.configuration.list works (one of the general downsides of our configuration format), but it gets the job done, and the server can be agnostic about these keys.

I proposed these specific names internal.webClient.appInit.canCopy / internal.webClient.appInit.canDownloadCsv, and I think they are the best names for now. Specifically named to suggest they are an internal implementation detail, and may change in the future.

Long term, I think there will be a much better way to configure these.

@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed November 29, 2022 17:56
@Zhou-Ziheng Zhou-Ziheng merged commit 0c0142f into deephaven:main Nov 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration to disable front-end data exfiltration
3 participants