Giter VIP home page Giter VIP logo

client-cpp's People

Contributors

bleggett avatar dmihalcik-virtru avatar elizabethhealy avatar jrschumacher avatar krokhmaliuk-virtru avatar mustyantsev avatar patmantru avatar sievdokymov-virtru avatar sujankota avatar vheneraliuk avatar virtru-cloudnative avatar woodlyer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mayeut

client-cpp's Issues

Http call to https://api-develop01.develop.virtru.com/kas Bad Request

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

constexpr auto kasUrl = "https://api-develop01.develop.virtru.com/kas";

Missing libiconv linker dep?

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

for below error please guide with the solution Error: could not load cache ERROR: conanfile.py: Error in build() method, line 34

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!!

client-cpp test fails Error

Hi,

While I was trying to setup client-cpp in my local development environment, I am getting this error of failing to pass testcases. Can someone please see the error and guide me on how to resolve it.

image (2)

image (1)

image

Thanks,
Br,
VivekS

error loading conanfile while running build-all.sh script

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)

Use of gsl/span breaks Linux build

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.

conan 2.x is not supported. README does not indicate version

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

tdf_libarchive_writer.cpp and other 3 files are not used

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

Client is keycloak specific, other IdP is not working

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:

static constexpr auto kKCRealmPath = "/auth/realms/";

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.