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

feat(sdk): remove hex encoding for segment hash #397

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

sujankota
Copy link
Contributor

No description provided.

@sujankota sujankota requested a review from a team as a code owner December 6, 2024 00:28
Copy link

github-actions bot commented Dec 6, 2024

If these changes look good, signoff on them with:

git pull && git commit --amend --signoff && git push --force-with-lease origin

If they aren't any good, please remove them with:

git pull && git reset --hard HEAD~1 && git push --force-with-lease origin

Copy link

github-actions bot commented Dec 6, 2024

If these changes look good, signoff on them with:

git pull && git commit --amend --signoff && git push --force-with-lease origin

If they aren't any good, please remove them with:

git pull && git reset --hard HEAD~1 && git push --force-with-lease origin

@@ -6,4 +6,5 @@ export type Manifest = {
payload: Payload;
encryptionInformation: EncryptionInformation;
assertions: Assertion[];
tdf_spec_version: string;
Copy link

Choose a reason for hiding this comment

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

it looks like this is importing this file which specifies version 0.2.0 of the TDF spec. Is that what we should be doing in java?

Copy link
Member

Choose a reason for hiding this comment

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

No, this should somehow be the spec version, which AFAIK is 4.3.0

https://github.com/opentdf/spec/blob/3c5adf29fe9c327b2f85b89e8beee09f0b91d8c7/VERSION

@@ -6,4 +6,5 @@ export type Manifest = {
payload: Payload;
encryptionInformation: EncryptionInformation;
assertions: Assertion[];
tdf_spec_version: string;
Copy link
Member

Choose a reason for hiding this comment

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

No, this should somehow be the spec version, which AFAIK is 4.3.0

https://github.com/opentdf/spec/blob/3c5adf29fe9c327b2f85b89e8beee09f0b91d8c7/VERSION

lib/tdf3/src/tdf.ts Show resolved Hide resolved
Copy link

github-actions bot commented Jan 2, 2025

If these changes look good, signoff on them with:

git pull && git commit --amend --signoff && git push --force-with-lease origin

If they aren't any good, please remove them with:

git pull && git reset --hard HEAD~1 && git push --force-with-lease origin

Copy link

sonarqubecloud bot commented Jan 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@dmihalcik-virtru dmihalcik-virtru self-requested a review January 9, 2025 14:36
@@ -1,2 +1,2 @@
export const version = '0.2.0';
export const version = '4.3.0';
Copy link
Member

Choose a reason for hiding this comment

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

The version field is set automatically by the bump-version.sh script, so rename this to either tdfSpecVersion or targetFileFormatVersion or similar

Suggested change
export const version = '4.3.0';
export const version = '0.2.0';
export const tdfSpecVersion = '4.3.0';

@@ -269,26 +271,35 @@ async function _generateManifest(
// generate the manifest first, then insert integrity information into it
encryptionInformation: encryptionInformationStr,
assertions: assertions,
tdf_spec_version: version,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
tdf_spec_version: version,
tdf_spec_version: tdfSpecVersion,

@@ -4,6 +4,8 @@ import { DecoratedReadableStream } from './client/DecoratedReadableStream.js';
import { fetchKasPubKey as fetchKasPubKeyV2, fetchWrappedKey } from '../../src/access.js';
import { DecryptParams } from './client/builders.js';
import { AssertionConfig, AssertionKey, AssertionVerificationKeys } from './assertions.js';
import { version } from './version.js';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { version } from './version.js';
import { tdfSpecVersion } from './version.js';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants