The Simplest Way to Make Json Rpc and Port Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running json rpc and port together lets teams trigger remote method calls from a single developer portal. Port acts as the front-end catalog, while JSON-RPC services run the backend jobs and return status data. This setup gives engineers a clean self-service view for complex backend tasks. Teams can click a button in the portal to run a remote procedure. The backend service handles the payload and sends back a structured JSON reply. When set up well, this flow cuts down manual ticket work for p

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Running json rpc and port together lets teams trigger remote method calls from a single developer portal. Port acts as the front-end catalog, while JSON-RPC services run the backend jobs and return status data.

This setup gives engineers a clean self-service view for complex backend tasks. Teams can click a button in the portal to run a remote procedure. The backend service handles the payload and sends back a structured JSON reply. When set up well, this flow cuts down manual ticket work for platform teams.

How json rpc and port handle data flow and permissions

A clear data flow keeps both systems fast and safe. First, a developer logs into Port and picks a self-service action. Port checks the user role against its internal catalog rules. If the user has the right role, Port prepares a request payload. This payload holds the method name, input values, and a request ID.

Next, the action triggers a backend runner or webhook receiver. That receiver formats the payload into a strict JSON-RPC message and sends it to the target service. Both systems rely on tokens or signing keys to verify each message. The JSON-RPC server checks the key before it runs any requested method.

Once the method finishes, the server sends back a result object or an error object. The runner reads the response ID to match it with the original portal action. Then it updates the entity state and action log inside Port. The developer sees the final status right on the portal page.

Common failure modes and how to scope access

Many teams hit trouble when they share one broad API key across all portal actions. If one static token can call every remote method, a small mistake can wipe production data. Shared service accounts also hide who ran a change. Audit logs in the backend only show the generic portal account, not the human user.

Unlogged calls create another big blind spot for security teams. Since JSON-RPC sends all method names inside the request body, basic network logs miss the details. Every call hits the exact same endpoint path using the same HTTP verb. You must parse the message body to know if a user read data or deleted a cluster.

JSON Web Tokens (JWT) + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix these risks, scope roles down to the exact method name. Split read methods and write methods into separate service accounts with distinct keys. Pass the portal user identity inside the request metadata so backend logs record the real caller. Set strict network rules so only approved runners can reach the JSON-RPC listener.

Keeping sensitive fields safe in portal responses

Remote methods often return large state objects from internal databases or user stores. Sometimes these payloads include sensitive data like emails, phone numbers, card numbers, or national IDs. Sending raw payloads straight back to the portal catalog puts private data in front of too many eyes.

Teams should filter and scrub response payloads before updating the portal catalog. Data masking rewrites matched fields in results so sensitive strings stay safe during fixing. You can also limit which response fields map back into the portal entity schema. Keep the portal view focused on high-level health metrics, build versions, and run status.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

How does Port know when an asynchronous JSON-RPC job finishes?

The JSON-RPC server returns an immediate receipt ID when the job starts. Once the background work ends, the runner sends a separate status update back to the Port API.

Why do standard network logs miss JSON-RPC method names?

JSON-RPC sends every call to a single URL path and puts the method name inside the body. Standard web logs only record the URL path and status code, not the payload body.

How should teams handle expired tokens between the two tools?

Use short-lived tokens that refresh before each action run instead of long-lived static keys. If a call fails due to an expired key, return a clear error code to the portal log.

The query runs. The emails stay hidden.