opentdf / client-cpp Goto Github PK
View Code? Open in Web Editor NEWMinimal C++ client to generate and access TDF files
License: BSD 3-Clause Clear License
Minimal C++ client to generate and access TDF files
License: BSD 3-Clause Clear License
When running sh build-all.sh
I am getting the error below. Bad URL
13/34 Test #13: test_http_client_service ...........***Failed 0.26 sec
Running 3 test cases...
client-cpp/src/tests/test_http_client_service.cpp:50: fatal error: in "test_http_client_service_suite/test_http_client_service_get": 1 stream truncated
When trying to link against a statically-linkedclient-cpp
installed via conan install opentdf-client/1.1.5@ --build=missing
, I get this error about libiconv
(building in amd64 linux - Debian bullseye
)
If this is a dep, shouldn't it be statically linked?
[linux/amd64 stage-1 8/9] RUN go build -o /dist/wrappertest ./cmd/wrappertest: #0 0.331 go: downloading go.uber.org/zap v1.23.0 #0 1.237 go: downloading go.uber.org/atomic v1.10.0 #0 1.256 go: downloading go.uber.org/multierr v1.8.0 #0 60.41 # github.com/opentdf/client-go/cmd/wrappertest #0 60.41 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 #0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlIconvWrapper': #0 60.41 encoding.c:(.text+0xff9): undefined reference to `libiconv' #0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlFindCharEncodingHandler': #0 60.41 encoding.c:(.text+0x2322): undefined reference to `libiconv_open' #0 60.41 /usr/bin/ld: encoding.c:(.text+0x2334): undefined reference to `libiconv_open'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x23dd): undefined reference to `libiconv_open'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x2438): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x2482): undefined reference to `libiconv_open'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x24ec): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x2509): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x2511): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlCharEncOutput':
#0 60.41 encoding.c:(.text+0x34bc): undefined reference to `libiconv'
#0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlCharEncOutFunc':
#0 60.41 encoding.c:(.text+0x39c1): undefined reference to `libiconv'
#0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlCharEncCloseFunc':
#0 60.41 encoding.c:(.text+0x3baa): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: encoding.c:(.text+0x3c05): undefined reference to `libiconv_close'
#0 60.41 /usr/bin/ld: /build/tdf-client/lib/libopentdf_static_combined.a(encoding.o): in function `xmlByteConsumed':
#0 60.41 encoding.c:(.text+0x3d8e): undefined reference to `libiconv'
#0 60.41 collect2: error: ld returned 1 exit status
#0 60.41
This error does not happen for static client-cpp
binaries I build with build-all.sh
46/include;/root/.conan/data/libiconv/1.17///package/dfbe50feef7f3c6223a476cd5aeadb687084a646/include;/root/.conan/data/zlib/1.2.12///package/dfbe50feef7f3c6223a476cd5aeadb687084a646/include
-- Lib output dir: /home/open/client-cpp/src/lib
-- Static lib name: libopentdf_static.a
-- Static lib full path: /home/open/client-cpp/src/lib/libopentdf_static.a
-- Combined lib name: libopentdf_static_combined.a
-- Combined full path: /home/open/client-cpp/src/lib/libopentdf_static_combined.a
-- mri file /home/open/client-cpp/src/src/lib/tdf.mri
-- Shared lib name: libopentdf.so
-- Shared lib full path: /home/open/client-cpp/src/lib/libopentdf.so
-- Configuring done (0.1s)
-- Generating done (0.2s)
-- Build files have been written to: /home/open/client-cpp/src
Error: could not load cache
ERROR: conanfile.py: Error in build() method, line 34
cmake.build()
ConanException: Error 1 while executing cmake --build '/home/open/client-cpp/src/build' '--' '-j2'
make: *** No rule to make target 'test'. Stop.
Error: Unit test failed. Fix it!!
sh build-all.sh
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
ERROR: Error loading conanfile at '/home/opentdf/client-cpp/src/conanfile.py': Unable to load conanfile in /home/opentdf/client-cpp/src/conanfile.py
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/opentdf/client-cpp/src/conanfile.py", line 1, in
from conans import ConanFile, CMake
ImportError: cannot import name 'ConanFile' from 'conans' (/home/opentdf/conan-io/conans/init.py)
Linux: AlmaLinux release 8.5 (Arctic Sphynx)
mkdir build
cd build
cmake ..
make
Output:
client-cpp/src/lib/include/crypto/bytes.h:117:23: error: use of ‘constexpr auto virtru::crypto::toBytes(const Cont&) [with Cont = gsl::span<const std::byte, 18446744073709551615>; = void]’ before deduction of ‘auto’
return toBytes(gsl::make_span(cont));
The above is if you try to use https://github.com/microsoft/GSL/tree/main/include to satisfy #include <gsl/span> in file client-cpp/src/lib/include/crypto/bytes.h which is MS specific (?)
Using build-all.sh:
ERROR: boost/1.81.0: Error in build() method, line 887
self.run(full_command)
ConanException: Error 1 while executing b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/root/.conan/data/boost/1.81.0///source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc define=GLIBCXX_USE_CXX11_ABI=0 pch=on -sLIBBACKTRACE_PATH=/root/.conan/data/libbacktrace/cci.20210118///package/1d877a3df840030e6a8abb74c5ffb9088d08b47a linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan/data/boost/1.81.0///package/8129c1a144107a2863d1660379f7c184055453dd -j4 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan/data/boost/1.81.0//_/build/8129c1a144107a2863d1660379f7c184055453dd/build-release"
ERROR: conanbuildinfo.txt file not found in somedevdir/client-cpp/src/build
It is required for this command
You can generate it using 'conan install'
Use of conan 1.56 almost works. Version 2.0 does not: recipes aren't up-to-date.
brew install conan cmake
will install version 2.x of Conan. Using this version gives an error:
ERROR: Error loading conanfile at '/Users/paul/Projects/arkavo/client-cpp/src/conanfile.py': Unable to load conanfile in /Users/paul/Projects/arkavo/client-cpp/src/conanfile.py
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/paul/Projects/arkavo/client-cpp/src/conanfile.py", line 1, in <module>
from conans import ConanFile, CMake
ImportError: cannot import name 'ConanFile' from 'conans' (/opt/homebrew/Cellar/conan/2.0.7/libexec/lib/python3.11/site-packages/conans/__init__.py)
Please support latest conan | or update docs to install conan 1.x
In the tdf(zip) according to the spec we should have manifest.json but we are calling it 0.manifest.json which is unexpected.
These 4 files are not list in src/lib/CMakeSources.txt
Maybe they can be deleted?
src/lib/src/tdf_libarchive_writer.cpp
src/lib/src/tdf_libarchive_writer.h
src/lib/src/tdf_libarchive_reader.cpp
src/lib/src/tdf_libarchive_reader.h
the top-level readme should have a list/table of high-level features and capabilities. it should have the same structure as other sdk/client library repos, so people can compare which features exists in which SDK.
have you ever test the s3 out provider?
client->encryptWithIOProviders(s3ip, s3op3);
when gnerate tdf file and write to s3 server, the writeByte function can be called several times.
but the data will write over the data before. but not append data at the end of file.
https://github.com/opentdf/client-cpp/blob/main/src/lib/src/s3_io_provider.cpp#L169
I am trying to use the python opentdf client. I have the GoKAS setup and I am trying to use AWS Cognito IdP (keycloak won't scale for us). I am using client credentials. The error is happening with when forming the .well-known URL.
Expected:
https://cognito-idp.us-east-2.amazonaws.com/us-east-2_tL45F9iDa/.well-known/openid-configuration
Actual:
https://cognito-idp.us-east-2.amazonaws.com/auth/realms/us-east-2_tL45F9iDa/protocol/openid-connect/token
A .py for easy reproducing is in the OpenTDF slack.
The hard code is here:
client-cpp/src/lib/include/sdk_constants.h
Line 233 in 06accc7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.