Java SDK

Java SDK Changelog

Below is the changelog of our Java SDK, oso-cloud:

1.1.0-alpha.2

  • Move ParityHandle to public API - users no longer need to import from internal package.

1.1.0-alpha.1

  • Add ParityHandle for use with unreleased Oso Migrate.

1.0.0

See the migration guide for details on upgrading from v0.x.

This major release introduces a redesigned API surface for improved consistency and developer experience, including the new Query Builder API. Please consult the migration guide for a comprehensive list of breaking changes and instructions on adapting your code.

Breaking Changes & New Features:

  • Package Structure: Public API is now primarily accessed via com.osohq.oso_cloud.Oso. Query-related methods are available through the QueryBuilder returned by oso.buildQuery().
  • Centralized Authorization Data API:
    • tell(name, ...args) is replaced by insert(Fact).
    • delete(name, ...args) is replaced by delete(Fact) for specific facts and a new delete(FactPattern) overload for pattern matching using ValuePattern.ANY and ValuePattern.ValueOfType.
    • get(name, ...args) is replaced by get(FactPattern) which allows wildcard matching.
    • bulkTell, bulkDelete, and bulk are replaced by the atomic batch(Consumer<BatchTransaction>) method, using tx.insert() and tx.delete() within the transaction.
  • Query API:
    • The previous query and authorizeResources methods are replaced by the new fluent Query Builder API, accessed via oso.buildQuery().
    • The Query Builder (com.osohq.oso_cloud.QueryBuilder) provides methods like and(), in(), withContextFacts(), and evaluate() (using EvaluateArgs.exists(), EvaluateArgs.values(), EvaluateArgs.map()) for constructing and executing flexible queries.
    • Queries returning unconstrained results (e.g., an admin can access everything) now yield "*" in the results list, consistent with Check APIs.
  • Local Check API:
    • Integrates with the new Query Builder API via evaluateLocalSelect() and evaluateLocalFilter() methods on the QueryBuilder for generating SQL.
    • Existing listLocal, authorizeLocal, and actionsLocal methods remain functional.

0.11.0

  • Add support for QueryBuilder and local authorization evaluation.

0.10.0

  • Added .equals() method for Value and Fact classes.

0.9.0

  • Add context facts support to actionsLocal, listLocal, authorizeLocal

0.8.0

  • Increase the maximum number of connections used in the connection pool to 20. Previous default was 2 which limited the throughput a single client would handle.
  • Added a setMaxConnections method to configure the maximum number.

0.7.1

  • Specify a User-Agent to identify the Java and SDK client versions.
  • Treat all 2xx status codes as valid.

0.7.0

  • Use Fallback, if configured, for .get, .get_policy_metadata, and local check APIs if Oso Cloud returns an error (Requires Fallback 1.0.0 or later)
  • Use Fallback, if configured, if Oso Cloud returns an HTTP 400 error

0.6.0

  • Remove extra argument from actionsLocal and mark old version as deprecated.

0.5.1

  • Add X-Request-ID header to uniquely identify individual API requests; include this ID in error messages for better debugging.

0.5.0

0.4.2

  • Add X-Request-ID header to uniquely identify individual API requests; include this ID in error messages for better debugging.

0.4.1

Removed undocumented & no longer in-use built-in Float type.

0.4.0

Added support for the local check api: