Add a Java signing client - #128
Open
beetlebugorg wants to merge 2 commits into
Open
Conversation
org.beetlebug:moddims at clients/java signs /dims4/ and /dims5/ URLs and encrypts an image URL into eurl. Java 17, no runtime dependency, and JUnit 5 in the test scope. The checked in version is 0.0.0-SNAPSHOT. Rules holds the escape table, the two decoders, the sort, and the URL splitting. URLEncoder escapes a tilde and leaves an asterisk alone, and URLDecoder reads a plus as a space, so the class writes both. String.compareTo orders by UTF-16 code unit and the module orders by UTF-8 byte, so the sort compares name.getBytes(UTF_8). Java 17 has no HKDF, so Eurl does the extract and the expand from RFC 5869. IllegalArgumentException is the whole error surface, and its message starts with the rule that fired. FixtureTest reads test/fixtures/signing.tsv and runs every record as its own test. SignerTest covers what a record cannot.
clients.yml gains a java job that runs mvn -B test from clients/java on Temurin 17. release-java.yml publishes org.beetlebug:moddims to GitHub Packages on a clients/java/v tag. It reads the version from the tag and deploys with the built-in GITHUB_TOKEN, so a release needs no secret of its own. The release profile attaches the sources jar and the javadoc jar. release.yml keeps its v* trigger, and clients/java/v1.0.0 does not match it. maven.pkg.github.com answers 401 to an unauthenticated read, including from a public repository. docs/docs/clients/java.md gives the server block a consumer puts in settings.xml and the repository block it names.
beetlebugorg
added this pull request to stack #129
September 9, 2026 23:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
org.beetlebug:moddimsatclients/javasigns/dims4/and/dims5/URLs and encrypts an image URL intoeurl. Java 17, no runtime dependency, and JUnit 5 in the test scope.Dims5SignerandDims4Signereach have asignmethod and asignEncryptedmethod.Eurlholds the key derivation and the two ciphers.IllegalArgumentExceptionis the whole error surface, and its message starts with the rule that fired.clients.ymlgains ajavajob that runsmvn -B teston Temurin 17.release-java.ymlpublishes to GitHub Packages on aclients/java/vtag, with the built-inGITHUB_TOKEN. Thereleaseprofile attaches the sources jar and the javadoc jar.release.ymlkeeps itsv*trigger, andclients/java/v1.0.0does not match it..gitignoregains/clients/java/target/, the directory a Maven build writes.Why
Stacked on #127, and below that on #126.
Issue #124.
Ruleswrites its own escape table, its own two decoders, and its own sort.URLEncoderescapes a tilde as%7Eand leaves an asterisk alone, so it produces a canonical query the module refuses.URLDecoderreads a plus as a space, andurlkeeps the plus.String.compareToorders by UTF-16 code unit and the module orders by UTF-8 byte, so the sort comparesname.getBytes(UTF_8). Java 17 has no HKDF, soEurldoes the extract and the expand from RFC 5869.maven.pkg.github.comanswered401to an unauthenticated GET when I checked it. A consumer puts a GitHub token insettings.xml, anddocs/docs/clients/java.mdgives the server block and the repository block.Verify
54 tests pass.
FixtureTestruns all 42 records fromtest/fixtures/signing.tsvas its own tests, so a failure names the case.release-java.ymlhas not run. The firstclients/java/v1.0.0tag is the test.