Skip to content

feat: support configurable SLIM identity and node connection in SlimHelper - #13

Merged
janosSarusiKis merged 1 commit into
mainfrom
feat/configurable-identity
Oct 13, 2026
Merged

janosSarusiKis merged 1 commit into
mainfrom
feat/configurable-identity

Conversation

@muscariello

Copy link
Copy Markdown
Member

Fixes #12

Changes

  • New SlimHelper overloads:

    • createServer(Name local, IdentityProviderConfig, IdentityVerifierConfig, ClientConfig)
    • createChannel(Name local, Name remote, IdentityProviderConfig, IdentityVerifierConfig, ClientConfig)

    These let callers use JWT (e.g. EdDSA did:key with a JWKS allowlist), static JWT or SPIRE identities, and TLS/mTLS plus basic or JWT auth to the node.

  • The existing secret/serverAddr overloads are unchanged and now delegate to the new ones. They use the new sharedSecretProvider / sharedSecretVerifier factories, which build the same configs as createAppWithSecret.

  • JUnit 5 tests. Surefire now passes --enable-preview --enable-native-access=ALL-UNNAMED so tests can load the native bindings.

  • README section with a JWT identity + TLS/bearer-token client config example.

Caller identity in SlimA2AHandler

I left this unchanged. In slim-bindings-java 2.0.0 the SlimRPC Context exposes only sessionId, metadata and the deadline. It has no source name and no verified peer identity, so handlers still see an anonymous user. Filling ServerCallContext from peer_subject/peer_issuer should come after the bindings bump to 3.3.

Testing

  • mvn verify (Temurin 21): 5 tests pass.
  • Manual e2e against a SLIM 2.0.0 node:
    • The echo example (shared-secret path) runs all demos.
    • A server and client using the new overloads with EdDSA JWT + JWKS complete GetExtendedAgentCard.
    • A client signing with a key that isn't in the JWKS is rejected (identity verification failed: token invalid).

…elper

Add SlimHelper.createServer/createChannel overloads that take an
IdentityProviderConfig, IdentityVerifierConfig and ClientConfig, so
callers can use JWT (e.g. EdDSA did:key with a JWKS allowlist), static
JWT or SPIRE identities, and TLS plus auth to the SLIM node. The
existing shared-secret/insecure overloads now delegate to them via the
new sharedSecretProvider/sharedSecretVerifier factories.

Add unit tests (JUnit 5, surefire configured for the FFM preview
flags) and document the JWT identity and TLS client config in the
README.

Signed-off-by: Luca Muscariello <muscariello@ieee.org>
@janosSarusiKis
janosSarusiKis merged commit 69a3c84 into main Oct 13, 2026
4 checks passed
@janosSarusiKis
janosSarusiKis deleted the feat/configurable-identity branch October 13, 2026 14:09
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 caller-configurable SLIM identity, secure node connections and verified caller identity

2 participants