Java SDK for the One Identity Safeguard REST API.
Artifact: com.oneidentity.safeguard:safeguardjava.
src/main/java/com/oneidentity/safeguard/safeguardjava/— SDK sources (Safeguard, connections, A2A, auth, events, restclient, data, exceptions)tests/safeguardjavaclient/— interactive live-appliance Java test clientTestFramework/— PowerShell appliance-test scaffoldingSamples/— standalone sample Maven projects.agents/skills/— on-demand guidancepipeline-templates/,azure-pipelines.yml— CI definitionspom.xml,settings/settings.xml,spotbugs-exclude.xml— build, publishing, static analysis
Prerequisites: JDK 8+ and Maven 3.0.5+.
mvn package
mvn verify
mvn clean verify
mvn package "-Dspotbugs.skip=true"In PowerShell, quote -D... flags. For endpoint discovery, use
https://<address>/service/<service>/swagger; see api-patterns.
mvn editorconfig:check— formatting and LF line endingsmvn verify— EditorConfig + SpotBugs through Maven
There is no root-level mock/unit suite. Use:
mvn verifytests/safeguardjavaclient/TestFramework/Samples/
See testing-guide for setup and workflow details.
- keep passwords, tokens, API keys, and certificate passwords as
char[], then clear them - code against
I-prefixed interfaces (ISafeguardConnection,ISafeguardA2AContext,ISafeguardEventListener,IAuthenticationMechanism) - call
dispose()on connections, A2A contexts, and listeners - expect
ArgumentException,SafeguardForJavaException, andObjectDisposedException - preserve Java 8 compatibility and standard Java naming
- do not recommend
ignoreSsl=truefor production without a warning - keep repository text files on LF line endings, especially on Windows
See the build-and-release skill.
- never commit real passwords, API keys, access tokens, PFX/JKS files, private keys, or signing secrets
- treat certificate material and retrieved secrets as sensitive runtime data
- keep docs and samples scrubbed of real appliance addresses and credentials
- prefer trusted certificates over disabling SSL checks
- the Maven package version comes from
${revision}inpom.xml - release automation injects the effective version with
-Drevision=... - the default Safeguard API version is v4; pass
apiVersionfor older endpoints - preserve Java 8 compatibility in public APIs and examples
| Skill | When to read | File |
|---|---|---|
| Build and Release | Pipelines, signing, publishing, releases | .agents/skills/build-and-release/SKILL.md |
| API Patterns | Standard REST calls, bodies, query params, responses | .agents/skills/api-patterns/SKILL.md |
| A2A Workflow | A2A contexts, API keys, brokering, A2A events | .agents/skills/a2a-workflow/SKILL.md |
| Testing Guide | Live-appliance validation and test workflows | .agents/skills/testing-guide/SKILL.md |
| Architecture | SDK internals, auth flows, listeners, connections | .agents/skills/architecture/SKILL.md |
| Sample | Description |
|---|---|
PasswordConnect |
Password auth + GET Me |
CertificateConnect |
PKCS12/PFX certificate auth |
A2ARetrievalExample |
A2A credential retrieval |
EventListenerExample |
Persistent SignalR listener |
Keep this file short and always-on. Move deep procedures into .agents/skills/, and
update structure/build/test/security pointers when workflows change.