{"id":18458464,"url":"https://github.com/relaycorp/awala-testing-jvm","last_synced_at":"2026-01-30T04:38:51.367Z","repository":{"id":37941715,"uuid":"293933553","full_name":"relaycorp/awala-testing-jvm","owner":"relaycorp","description":"Testing utilities for Awala implementations on the JVM","archived":false,"fork":false,"pushed_at":"2024-10-21T17:16:58.000Z","size":1295,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T05:34:11.572Z","etag":null,"topics":["awala","java","jvm","kotlin","testing"],"latest_commit_sha":null,"homepage":"https://docs.relaycorp.tech/awala-testing-jvm/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relaycorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-08T21:39:52.000Z","updated_at":"2025-03-18T21:49:02.000Z","dependencies_parsed_at":"2023-11-07T01:22:33.714Z","dependency_job_id":"6498494f-3fb2-4fa0-ac6c-62afae9894b5","html_url":"https://github.com/relaycorp/awala-testing-jvm","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/relaycorp/awala-testing-jvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fawala-testing-jvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fawala-testing-jvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fawala-testing-jvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fawala-testing-jvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relaycorp","download_url":"https://codeload.github.com/relaycorp/awala-testing-jvm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fawala-testing-jvm/sbom","scorecard":{"id":769778,"data":{"date":"2025-08-11","repo":{"name":"github.com/relaycorp/awala-testing-jvm","commit":"36b4d361aea1e48b35e569a1b6248618c9155486"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/prs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 2/4 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/relaycorp/awala-testing-jvm/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/relaycorp/awala-testing-jvm/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/prs.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/relaycorp/awala-testing-jvm/prs.yml/master?enable=pin","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/relaycorp/.github/SECURITY.md:1","Info: Found linked content: github.com/relaycorp/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/relaycorp/.github/SECURITY.md:1","Info: Found text in security policy: github.com/relaycorp/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T01:55:07.395Z","repository_id":37941715,"created_at":"2025-08-23T01:55:07.395Z","updated_at":"2025-08-23T01:55:07.395Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28902797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T04:02:34.702Z","status":"ssl_error","status_checked_at":"2026-01-30T04:02:33.562Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awala","java","jvm","kotlin","testing"],"created_at":"2024-11-06T08:18:41.367Z","updated_at":"2026-01-30T04:38:51.338Z","avatar_url":"https://github.com/relaycorp.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# awala-testing-jvm\n\nTesting utilities for Relaynet implementations on the JVM.\n\n## Install\n\nThis module is available on JCenter as `tech.relaycorp:awala-testing`. [Find the latest version on Maven Central](https://search.maven.org/artifact/tech.relaycorp/awala-testing).\n\n## Usage\n\n### Mock certification paths\n\nThis module exposes two valid certification paths:\n\n- `PDACertPath` represents the path from an Internet gateway to a Parcel Delivery Authorization (PDA).\n- `CDACertPath` represents the path from an Internet gateway to a Cargo Delivery Authorization (CDA).\n\nThe key pairs for the certificates in those paths can be found in `KeyPairSet`. Keys are generated once at runtime and can be used as follows:\n\n```kotlin\nimport tech.relaycorp.relaynet.testing.pki.KeyPairSet\nimport tech.relaycorp.relaynet.testing.pki.PDACertPath\n\nval parcel = Parcel(\n    Recipient(\"0deadbeef\", \"endpoint.com\"),\n    PDACertPath.PDA,\n    \"payload\".toByteArray()\n)\nval parcelSerialized = parcel.serialize(KeyPairSet.PDA_GRANTEE.private)\n```\n\nRefer to the API documentation to find all the entities in the path.\n\n### Mock PDC Client\n\nYou can use the `MockPDCClient` provided by this module to replace an actual PDC Client (e.g., [PoWeb's](https://github.com/relaycorp/relaynet-poweb-jvm)) in a unit test suite. This way, you'll avoid making real calls to an external system, and you'll be able to inspect how the client was used.\n\nThe first step is to make the unit under test (UUT) use the mock client instead of the real one, which could be done with dependency injection or by mocking a method that would return an instance of the client. Either way, make sure the UUT uses the interface `PDCClient` from the core Relaynet library instead of a concrete implementation.\n\nThe mock client is initialised with the exact sequence of method calls you'd expect your UUT to make. For example, if you're testing the node registration flow, you'd want to check that the pre-registration and registration methods are called in that order and with the right arguments, so you'd write a test like the one below:\n\n```kotlin\nimport tech.relaycorp.relaynet.testing.pki.KeyPairSet\nimport tech.relaycorp.relaynet.testing.pki.PDACertPath\n\nval registrationAuthorization = \"the authorization\".toByteArray()\nval preRegistrationCall = PreRegisterNodeCall(\n    Result.success(\n        PrivateNodeRegistrationRequest(KeyPairSet.PRIVATE_GW.public, registrationAuthorization)\n    )\n)\nval registrationCall = RegisterNodeCall(\n    Result.success(\n        PrivateNodeRegistration(\n            PDACertPath.PRIVATE_GW,\n            PDACertPath.INTERNET_GW,\n            \"example.org\"\n        )\n    )\n)\n\nval client = MockPDCClient(preRegistrationCall, registrationCall)\nunitUnderTest.setClient(client)\nunitUnderTest.call()\n\nassertTrue(client.wasClosed)\n\nassertEquals(KeyPairSet.PRIVATE_GW.public, preRegistrationCall.arguments.nodePublicKey)\n\nval registrationRequestSerialized = registrationCall.arguments!!.pnrrSerialized\nval registrationRequest = PrivateNodeRegistrationRequest.deserialize(registrationRequestSerialized)\nassertEqual(KeyPairSet.PRIVATE_GW.public, registrationRequest.privateNodePublicKey)\nassertEqual(registrationAuthorization.asList(), registrationRequest.pnraSerialized.asList())\n```\n\nIf you want to reproduce a scenario where a call fails, simply initialise the respective call with the exception. For example:\n\n```kotlin\nval registrationCall = RegisterNodeCall(\n    Result.failure(Exception(\"Something went wrong\"))\n)\n```\n\nRefer to the API documentation to learn how to mock other methods.\n\n## API Documentation\n\nThe API documentation is available online on [docs.relaycorp.tech](https://docs.relaycorp.tech/awala-testing-jvm/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelaycorp%2Fawala-testing-jvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelaycorp%2Fawala-testing-jvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelaycorp%2Fawala-testing-jvm/lists"}