Giter Club home page Giter Club logo

bucketfs-client's People

Contributors

ckunki avatar dejanmihajlovic avatar kaklakariada avatar pj-spoelders avatar redcatbear avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rohankumardubey

bucketfs-client's Issues

Add integration tests using TLS

Currently integration tests only use unencrypted connections. We need to make sure that BFSC also works with bfss:/ URLs and TLS encrypted connections to the database.

That's why we need to add integration tests that use TLS. See also #31

Preconditions

Docker-db by default does not enable TLS for Bucketfs, see this default /exa/etc/EXAConf (for both Exasol 7.1 and 8):

[BucketFS : bfsdefault]
    Owner = 500 : 500
    # HTTP port number (0 = disabled)
    HttpPort = 2580
    # HTTPS port number (0 = disabled)
    HttpsPort = 0

That's why we need to update https://github.com/exasol/exasol-testcontainers/ to allow enabling TLS, see exasol/exasol-testcontainers#234

Bad error for "connection refused"

When pointing the client to a non-existent endpoint, the resulting error message needs a lot of interpretation:

#> java -jar bfsc-2.1.0.jar ls -pw bfs://localhost:2580/blah/
Password for reading from BucketFS: 
E-BFSJ-5: I/O error trying to list 'http://localhost:2580/blah'. Cause: null

Uploading file without directory fails

Uploading a file from the current working dir with the following command fails:

$ bfsc cp --profile default retail-mini-mapping.json bfs:/default/
Cannot invoke "java.nio.file.Path.relativize(java.nio.file.Path)" because "this.sourceRoot" is null

Workaround

Specify a relative path ./ to the file:

bfsc cp --profile default ./retail-mini-mapping.json bfs:/default/

Execution on macOS

I was not able to run the application from the terminal on macOS Monterey,
maybe this option also needs to be explained better.

Signing for macOS binaries will not be possible in near future.

Until then the macOS binaries should be removed

  • from releases
  • and documentation

Upload ignores bucket in the URL

If I run the following command

java -cp bfsc-0.1.0.jar com.exasol.bucketfs.client.BucketFsClient cp -p bfsc-0.1.0.jar bfs://localhost:6666/default/test1/

it produces the following error

E-BFSJ-1: Unable do upload http://localhost:6666/test/bfsc-0.1.0.jar. HTTP status 400.

If I instead run the following command where I doubled the bucket

java -cp bfsc-0.1.0.jar com.exasol.bucketfs.client.BucketFsClient cp -p bfsc-0.1.0.jar bfs://localhost:6666/default/default/test1/

It is afterwards available at http://localhost:6666/default/test1/bfsc-0.1.0.jar

Jar is not executable

When executing the jar with -jar option it fails because of a missing main manifest attribute.

% java -jar target/bfsc-0.2.0.jar 
no main manifest attribute, in target/bfsc-0.2.0.jar

Error on WSL/Ubuntu

tn@hw4122:~$ ./bfsc-linux_x86 --help
./bfsc-linux_x86: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by ./bfsc-linux_x86) 

Currently we cannot provide native binaries for other platforms.
The reported issue will be added as known issue to the documentation.

Improvement ideas for the User Guide

  1. Markup for the hyperlink near "SuSE: OpenJDK build of the Leap project" is seemingly broken.
  2. The tool seems to have quite a wide set of requirements. In my Ubuntu 22.04 running in a VirtualBox VM (host system is Windows 11) it's failing with
alex@alex-VirtualBox:~$ /home/alex/Downloads/bfsc-linux_x86 ls bfss://localhost:2581/default
The current machine does not support all of the following CPU features that are required by the image: [CX8, CMOV, FXSR, MMX, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, POPCNT, LZCNT, AVX, AVX2, BMI1, BMI2, FMA].
Please rebuild the executable with an appropriate setting of the -march option.alex@alex-VirtualBox:~$
  1. A trailing newline after the error message above would be useful.
  2. It is not crystal clear from the User Guide if the native executable supports "Linux" or "Ubuntu Linux".
  3. Again to wide system requirements, on Rocky Linux release 8.9 (Green Obsidian) the tool fails with
$ ~/Downloads/bfsc-linux_x86 bfsc ls bfss://localhost:2581/default
<path>/bfsc-linux_x86: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by <path>/bfsc-linux_x86)
<path>/bfsc-linux_x86: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by <path>/bfsc-linux_x86)

For release 1.1.2 this is Ubuntu 22.04 with glibc 2.32.

Maybe one can refresh this part (the latest version is 2.0.0)?

  1. "Retrieving the Password" section.
    /exa/etc/EXAConf is not a publicly available interface. Luckily, one can use ConfD job bucketfs_info.

Build a native image

BFSC is currently delivered as an executable JAR that requires installing a JVM for running. We should build and deliver a native executable for macOS, Linux and Windows so that users don't need to install a JVM for running BFSC.

Acceptance Criteria

  1. An executable for macOS, Linux and Windows is uploaded to the release page (in addition to the jar)
  2. Integration tests verify that the executable works on all three platforms
  3. User guide describes how to use the executable

See exasol/parquet-edml-generator#20 for an example

Add missing functionality

See exasol/bucketfs-python#33

Status MVP Feature
List buckets in bucketfs see exasol/bucketfs-java#54
List files in buckets or in "folders" (common path prefix)
Upload and download files to buckets (command cp)
Enhanced convenience for components in BFS path, e.g. host and port
Enhanced convenience for retrieving password
Delete files in bucketfs
read-password for non-public buckets
self contained executable, see #10
Recursive operations ls, cp, rm incl. upload and download of directories (potentially with multiple files)
cp supports to leave filename unchanged and omit from target path
Decode password from base64 encoding
Support wildcards like * and ? for source URIs
Consistent and complete support for TLS incl. certificates.
create and delete buckets in in contrast to directories and files inside a bucket
upload and download multiple files or folders, e.g. cp a.txt b.txt bfs:/
copy from one directory in bucketfs into another
mv command: rejected as not supported by HTTP API
copy from one bucket directory into another: rejected as multiple passwords could be involved which makes interface too complex

Uploading to Exasol v8 does not use TLS

Connection to Exasol v8 fails, even when specifying bfss://....
Also when entering a TLS port in config.ini BFSC still connects unencrypted (http), not TLS (https).

Fix vulnerabilities in org.apache.commons:commons-compress:jar:1.24.0:test

 Error:  Failed to execute goal org.sonatype.ossindex.maven:ossindex-maven-plugin:3.2.0:audit (default-cli) on project bucketfs-client: Detected 1 vulnerable components:
Error:    org.apache.commons:commons-compress:jar:1.24.0:test; https://ossindex.sonatype.org/component/pkg:maven/org.apache.commons/[email protected]?utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1
Error:      * [CVE-2024-25710] CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (8.1); https://ossindex.sonatype.org/vulnerability/CVE-2024-25710?component-type=maven&component-name=org.apache.commons%2Fcommons-compress&utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1
Error:      * [CVE-2024-26308] CWE-770: Allocation of Resources Without Limits or Throttling (7.5); https://ossindex.sonatype.org/vulnerability/CVE-2024-26308?component-type=maven&component-name=org.apache.commons%2Fcommons-compress&utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.