Skip to content

Conversation

@aaronlew02
Copy link
Collaborator

Closes #991

Summary

This change adds support for creating and verifying DSSE attestations.

@aaronlew02 aaronlew02 force-pushed the attest-dsse branch 7 times, most recently from e2be1c9 to 6db83ac Compare October 13, 2025 21:43
@aaronlew02 aaronlew02 force-pushed the attest-dsse branch 3 times, most recently from 7dd7cb0 to ef412b2 Compare October 21, 2025 19:27
@aaronlew02 aaronlew02 marked this pull request as ready for review October 24, 2025 15:34
Copy link
Member

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

looks pretty good some minor things

Comment on lines +167 to +180
@Override
int hashCode();

@Override
boolean equals(Object obj);

@Value.Check
default void check() {
// This is a workaround for immutables not using Arrays.equals for derived byte[]
// see: https://github.com/immutables/immutables/issues/1610
if (!Arrays.equals(getPAE(), getPAE())) {
throw new IllegalStateException("Should be unreachable");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

is any of this extra stuff necessary, seems like @Auxilary would be enough?

if (subject.getName() != null && !subject.getName().isEmpty()) {
continue;
}
throw new IllegalArgumentException("Payload must contain at least one non-empty subject");
Copy link
Member

Choose a reason for hiding this comment

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

Maybe, this error message could be more descriptive?

Payload must contain valid subjects?

return signFiles(List.of(artifact)).get(artifact);
}

public Bundle attest(String payload) throws KeylessSignerException {
Copy link
Member

Choose a reason for hiding this comment

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

Attest seems to be pretty similar to sign, can we refactor out some of the common parts?

It looks like it might a little complicated, but I'd likk to see what it could look like?

}

@Test
public void attest_validation() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this test is useful here for attest because we only have a single call of it. We used it in signFile/signDigest to ensure that the behavior made sense for all those depending on a single impl in signDigest

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.

Support uploading signed DSSEs

3 participants