Expose X-Request-ID via .getRequestId() for both synchronous Oso and asynchronous Oso.Async instances. The X-Request-ID is a UUIDv4 generated per request.
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.
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.