opentdf / tests

Tests for OpenTDF
BSD 3-Clause Clear License
4 stars 2 forks source link

feat(xtest): Cross test go and js sdks with new platform #153

Closed elizabethhealy closed 2 months ago

elizabethhealy commented 3 months ago

does tdf3 and nano Requires JS cli fix: https://github.com/opentdf/client-web/pull/306 -- EDIT: MERGED TODO: add cpp resolves https://github.com/opentdf/tests/issues/151

elizabethhealy commented 2 months ago

current x-test status:

TESTS FAILED! ZTDF: ['sdk/java/cli.sh=>sdk/go/cli.sh', 'sdk/go/cli.sh=>sdk/java/cli.sh', 'sdk/js/cli/cli.sh=>sdk/java/cli.sh', 'sdk/js/cli/cli.sh=>sdk/go/cli.sh'], NANO: []

some of the failures are due to the go sdk having the policy binding updates and the others not

when using go sdk prior to policy binding update -- still two failures sdk/go/cli.sh=>sdk/java/cli.sh and sdk/js/cli/cli.sh=>sdk/java/cli.sh -- their error outputs are below

go -> java:

java.lang.NullPointerException
    at io.opentdf.platform.sdk.TDF.loadTDF(TDF.java:570)
    at io.opentdf.platform.Command.decrypt(Command.java:91)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2070)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
    at picocli.CommandLine.execute(CommandLine.java:2174)
    at io.opentdf.platform.TDF.main(TDF.java:7)

js->java:

java.lang.RuntimeException: error gcm decrypt
    at io.opentdf.platform.sdk.AesGcm.decrypt(AesGcm.java:172)
    at io.opentdf.platform.sdk.TDF.loadTDF(TDF.java:521)
    at io.opentdf.platform.Command.decrypt(Command.java:91)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2070)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
    at picocli.CommandLine.execute(CommandLine.java:2174)
    at io.opentdf.platform.TDF.main(TDF.java:7)
Caused by: javax.crypto.AEADBadTagException: Tag mismatch!
    at java.base/com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:623)
    at java.base/com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1122)
    at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1059)
    at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853)
    at java.base/com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
    at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2202)
    at io.opentdf.platform.sdk.AesGcm.decrypt(AesGcm.java:168)
    ... 15 more
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud