diff --git a/docs/how-to/manage-data/local-facts-uploader.mdx b/docs/how-to/manage-data/local-facts-uploader.mdx
index 4c7c04b1..d7e26b42 100644
--- a/docs/how-to/manage-data/local-facts-uploader.mdx
+++ b/docs/how-to/manage-data/local-facts-uploader.mdx
@@ -6,7 +6,7 @@ title: Send Critical Updates
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
-When checking permissions right after creating or syncing a user, there may be a delay in data syncing to the PDP. To reduce this latency, weโve implemented a mechanism that sends data updates directly to the PDP first, then distributes them through OPAL (including other PDPs if you operate in multi-PDP setup).
+When checking permissions right after creating or syncing a user, there may be a delay in data syncing to the PDP. To reduce this latency, we've implemented a mechanism that sends data updates directly to the PDP first, then distributes them through OPAL (including other PDPs if you operate in multi-PDP setup).
The approach works by making calls directly to the PDP, which then forwards the facts to the connected OPAL Server. The OPAL Server will then distribute the facts to all the PDPs in the environment. The update has been added as a configuration option in the SDK which enables you to use the same favorite SDK to interact with Permit.io as you have previously without changing function calls. This approach will also ensure all other PDPs running in your environment receive those facts by forwarding the facts to the connected OPAL Server which then distributes the facts to all the PDPs in the environment.
@@ -84,6 +84,31 @@ func main() {
}
```
+
+
+
+
+```java
+import io.permit.sdk.Permit;
+import io.permit.sdk.PermitConfig;
+
+public class PermitExample {
+ public static void main(String[] args) {
+ // Initialize the SDK with your API key and PDP configuration
+ PermitConfig config = new PermitConfig.Builder("")
+ // In production, you might need to change this URL to fit your deployment
+ // This is the address where you can find the PDP container
+ .withPdpAddress("http://localhost:7766")
+ // configure the SDK to upload facts via the PDP
+ .withProxyFactsViaPdp(true)
+ // Add here any more configurations that you usually use
+ .build();
+
+ Permit permit = new Permit(config);
+ }
+}
+```
+
@@ -202,6 +227,43 @@ func main() {
+
+
+```java
+import io.permit.sdk.Permit;
+import io.permit.sdk.PermitConfig;
+import io.permit.sdk.api.models.UserCreate;
+
+public class PermitExample {
+ public static void main(String[] args) {
+ PermitConfig config = new PermitConfig.Builder("")
+ .withPdpAddress("http://localhost:7766")
+ .withProxyFactsViaPdp(true)
+ // configure the default time to wait for the facts to be synced
+ .withFactsSyncTimeout(10)
+ .build();
+
+ Permit permit = new Permit(config);
+
+ // Create a new user and wait for sync
+ UserCreate user = new UserCreate.Builder("auth0|elon")
+ .withEmail("elonmusk@tesla.com")
+ .withFirstName("Elon")
+ .withLastName("Musk")
+ .withAttributes(Map.of(
+ "age", 50,
+ "favorite_color", "red"
+ ))
+ .build();
+
+ // Using the default timeout configured in PermitConfig
+ permit.api.users.sync(user);
+ }
+}
+```
+
+
+
:::note Supported APIs
diff --git a/docs/sdk/sdks-overview.mdx b/docs/sdk/sdks-overview.mdx
index 060195ff..f2d42f17 100644
--- a/docs/sdk/sdks-overview.mdx
+++ b/docs/sdk/sdks-overview.mdx
@@ -16,45 +16,45 @@ This page lists the feature parity of the different SDKs that we provide to use
๐ค - Not compatible (The feature cannot be implemented in the language due to language limitations)
-| Feature โคต | NodeJS | Go | .NET | Java | Python | Ruby | Terraform |
-|--------------------------------|--------|----|------|------|--------|------|-----------|
-| Check | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
-| Check All Tenants | โ
| โ
| ๐ด | โ
| ๐ด | ๐ด | ๐ค |
-| Get User Permission | โ
| โ
| โ
| โ
| ๐ด | ๐ด | ๐ค |
-| Get User Permission (ABAC) | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
-| Get User Tenant | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
-| List Role Assignments from PDP | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Get Authorized Users | ๐ด | ๐ด | ๐ด | ๐ด | โ
| โ
| ๐ค |
-| Get Authorized Users(ABAC) | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Check URL | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
-| Sync User | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
-| Create User | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
-| Create User + Assign Roles | ๐ด | ๐ด | โ
| โ
| ๐ด | ๐ด | ๐ค |
-| Users | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
-| Resources | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
-| Tenants | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
-| Projects | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
-| Environments | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
-| Roles | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
-| Role Assignments | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
-| Condition Sets | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
-| Condition Set Rules | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
-| Relationship Tuples | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
-| Resource Relations | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
-| Role Derivations | ๐ด | โ
| ๐ด | โ
| ๐ด | ๐ด | โ
|
-| Resource Instances | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
-| Resource Roles | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
-| Resource Actions | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
-| Resource Action Groups | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
-| Resource Attributes | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
-| Bulk Check | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ค |
-| Elements Login | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
-| Bulk Users | โ
| ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Bulk Relationship Tuples | โ
| โ
| ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Bulk Role Assignments | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ค |
-| Bulk Tenants | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Bulk Resource Instances | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
-| Proxy Facts via PDP | โ
| ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Feature โคต | NodeJS | Go | .NET | Java | Python | Ruby | Terraform |
+|--------------------------------|---------|-----|-------|-------|----------|-------|------------|
+| Check | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
+| Check All Tenants | โ
| โ
| ๐ด | โ
| ๐ด | ๐ด | ๐ค |
+| Get User Permission | โ
| โ
| โ
| โ
| ๐ด | ๐ด | ๐ค |
+| Get User Permission (ABAC) | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
+| Get User Tenant | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
+| List Role Assignments from PDP | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Get Authorized Users | ๐ด | ๐ด | ๐ด | ๐ด | โ
| โ
| ๐ค |
+| Get Authorized Users(ABAC) | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Check URL | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ด | ๐ค |
+| Sync User | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
+| Create User | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
+| Create User + Assign Roles | ๐ด | ๐ด | โ
| โ
| ๐ด | ๐ด | ๐ค |
+| Users | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
+| Resources | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
+| Tenants | โ
| โ
| โ
| โ
| โ
| ๐ก | โ
|
+| Projects | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
+| Environments | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
+| Roles | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
+| Role Assignments | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
+| Condition Sets | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
+| Condition Set Rules | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
+| Relationship Tuples | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
+| Resource Relations | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
+| Role Derivations | ๐ด | โ
| ๐ด | โ
| ๐ด | ๐ด | โ
|
+| Resource Instances | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
+| Resource Roles | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ด |
+| Resource Actions | โ
| โ
| โ
| โ
| โ
| ๐ด | โ
|
+| Resource Action Groups | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ด |
+| Resource Attributes | โ
| โ
| ๐ด | โ
| โ
| ๐ด | โ
|
+| Bulk Check | โ
| โ
| โ
| โ
| โ
| ๐ด | ๐ค |
+| Elements Login | โ
| โ
| โ
| โ
| โ
| โ
| ๐ค |
+| Bulk Users | โ
| ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Bulk Relationship Tuples | โ
| โ
| ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Bulk Role Assignments | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ค |
+| Bulk Tenants | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Bulk Resource Instances | ๐ด | ๐ด | ๐ด | ๐ด | โ
| ๐ด | ๐ค |
+| Proxy Facts via PDP | โ
| โ
| ๐ด | โ
| โ
| ๐ด | ๐ค |
:::info Terraform Provider
The Terraform provider is not a full SDK, it is a tool to manage Permit.io resources using Terraform. It is not possible to implement all the features of the Permit.io API in Terraform due to Terraform limitations and basic design principles.