{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ciam/sdks/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["InteractiveLink","Notification","CodeBlockCustom","CodeItem"]},"type":"markdown"},"seo":{"title":"Entitlements quickstart","siteUrl":"https://developers.frontegg.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"entitlements-quickstart","__idx":0},"children":["Entitlements quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use Frontegg's Entitlements Engine from JVM applications with a gRPC client. Run feature checks, permission checks, and fine-grained authorization (FGA) from services built with Java or other JVM languages."]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"InteractiveLink","attributes":{"href":"https://github.com/frontegg/entitlements-client-java","target":"_blank","justifyContent":"center"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check out the repo on GitHub"]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Notification","attributes":{"title":"Prerequisites","type":"attention"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Entitlements client is the only supported Frontegg SDK for Java today. You need a reachable entitlements engine endpoint, an engine token (for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENTITLEMENTS_ENGINE_TOKEN"]},"), and a project using Maven or Gradle."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"modules-and-artifacts","__idx":1},"children":["Modules and artifacts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Artifacts are published to Maven Central under the group ID ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["com.frontegg.sdk"]},"."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Module"},"children":["Module"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Artifact ID"},"children":["Artifact ID"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Core"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entitlements-client"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gRPC client, check API, fallback, and caching"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BOM"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entitlements-client-bom"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bill of Materials for aligned dependency versions"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Spring Boot starter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entitlements-client-spring-boot-starter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Auto-configuration from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application.properties"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test utilities"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entitlements-client-test"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MockEntitlementsClient"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RecordingEntitlementsClient"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"install-with-maven-using-bom","__idx":2},"children":["Install with Maven (using BOM)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add BOM import and the core dependency. Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x.y.z"]}," with the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://central.sonatype.com/search?q=g:com.frontegg.sdk+entitlements-client-bom"},"children":["current release on Maven Central"]},"."]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["xml"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<dependencyManagement>\n    <dependencies>\n        <dependency>\n            <groupId>com.frontegg.sdk</groupId>\n            <artifactId>entitlements-client-bom</artifactId>\n            <version>x.y.z</version>\n            <type>pom</type>\n            <scope>import</scope>\n        </dependency>\n    </dependencies>\n</dependencyManagement>\n\n<dependencies>\n    <dependency>\n        <groupId>com.frontegg.sdk</groupId>\n        <artifactId>entitlements-client</artifactId>\n    </dependency>\n</dependencies>\n","lang":"xml"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"install-with-gradle-using-bom","__idx":3},"children":["Install with Gradle (using BOM)"]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["kotlin"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"implementation(platform(\"com.frontegg.sdk:entitlements-client-bom:x.y.z\"))\nimplementation(\"com.frontegg.sdk:entitlements-client\")\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-and-run-checks","__idx":4},"children":["Configure and run checks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ClientConfiguration"]}," with your engine host and token, create an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EntitlementsClient"]},", then call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isEntitledTo"]}," with a user context and either a feature or permission context."]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["java"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import com.frontegg.sdk.entitlements.EntitlementsClient;\nimport com.frontegg.sdk.entitlements.EntitlementsClientFactory;\nimport com.frontegg.sdk.entitlements.config.ClientConfiguration;\nimport com.frontegg.sdk.entitlements.model.EntitlementsResult;\nimport com.frontegg.sdk.entitlements.model.FeatureRequestContext;\nimport com.frontegg.sdk.entitlements.model.PermissionRequestContext;\nimport com.frontegg.sdk.entitlements.model.UserSubjectContext;\n\nClientConfiguration config = ClientConfiguration.builder()\n        .engineEndpoint(\"grpc.authz.example.com:443\")\n        .engineToken(System.getenv(\"ENTITLEMENTS_ENGINE_TOKEN\"))\n        .build();\n\ntry (EntitlementsClient client = EntitlementsClientFactory.create(config)) {\n\n    EntitlementsResult featureResult = client.isEntitledTo(\n            new UserSubjectContext(\"user-123\", \"tenant-456\"),\n            new FeatureRequestContext(\"advanced-reporting\")\n    );\n    System.out.println(featureResult.result() ? \"Access granted\" : \"Access denied\");\n\n    EntitlementsResult permissionResult = client.isEntitledTo(\n            new UserSubjectContext(\"user-123\", \"tenant-456\"),\n            new PermissionRequestContext(\"reports:export\")\n    );\n    if (!permissionResult.result()) {\n        throw new AccessDeniedException(\"Insufficient permissions\");\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Notification","attributes":{"title":"Long-running applications","type":"attention"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Spring Boot, Quarkus, Micronaut, or other long-lived processes, register the client as a singleton bean instead of creating it for each request or using try-with-resources per call."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"spring-boot-starter","__idx":5},"children":["Spring Boot starter"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For Spring Boot, add the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entitlements-client-spring-boot-starter"]}," artifact (via the same BOM) and configure properties in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application.properties"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application.yml"]}," so the client is created automatically. See the repository README for property names and examples."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"resources","__idx":6},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/frontegg/entitlements-client-java"},"children":["Full documentation and API reference"]}," in the GitHub repository"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ciam/guides/authorization/entitlements/agent/setup"},"children":["Entitlements engine setup"]}," — deploy SpiceDB and the sync job (language-agnostic)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ciam/sdks/backend/node/entitlements"},"children":["Node.js Entitlements"]}," — same engine from Node.js with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@frontegg/e10s-client"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/frontegg/entitlements-client-java/issues"},"children":["Issues"]}]}]}]},"headings":[{"value":"Entitlements quickstart","id":"entitlements-quickstart","depth":2},{"value":"Modules and artifacts","id":"modules-and-artifacts","depth":3},{"value":"Install with Maven (using BOM)","id":"install-with-maven-using-bom","depth":3},{"value":"Install with Gradle (using BOM)","id":"install-with-gradle-using-bom","depth":3},{"value":"Configure and run checks","id":"configure-and-run-checks","depth":3},{"value":"Spring Boot starter","id":"spring-boot-starter","depth":3},{"value":"Resources","id":"resources","depth":3}],"frontmatter":{"seo":{"title":"Entitlements quickstart"}},"lastModified":"2026-04-05T15:16:47.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ciam/sdks/backend/java/entitlements","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}