Skip to content

feat(docs): add Authorization REST API integration guide#285

Merged
marythought merged 7 commits intomainfrom
worktree-DSPX-2802-rest-api-guide
Apr 27, 2026
Merged

feat(docs): add Authorization REST API integration guide#285
marythought merged 7 commits intomainfrom
worktree-DSPX-2802-rest-api-guide

Conversation

@marythought
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new guide at /guides/authorization-rest-api showing how to call the OpenTDF Authorization Service directly over HTTP, without an SDK
  • Targets server-side integrators using Node.js, Python, Ruby, or any language without an OpenTDF SDK
  • Covers authentication (OIDC client credentials), health checks, GetDecision, GetDecisionBulk, GetEntitlements, attribute FQN construction, entity identifiers, batching strategies, and production best practices
  • Follows existing guide conventions (mermaid diagrams, tabbed code examples, admonitions, production checklist)

Context

Rocket.Chat PR #39845 built a full Virtru PDP integration by hand-rolling ~200 lines of HTTP calls. The existing authorization docs cover SDK usage only — this guide fills the gap for server-side REST API consumers.

Test plan

  • Dev server renders the page at /guides/authorization-rest-api
  • Mermaid sequence diagram renders
  • Tab components (curl / TypeScript / Python) work
  • Cross-links to /sdks/authorization, /sdks/obligations, /guides/authentication-guide resolve
  • Page appears in the Guides sidebar section

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive guide for the Authorization REST API, covering authentication, health checks, and core service endpoints with examples in multiple languages. The review feedback identifies a technical inaccuracy regarding the JSON structure for JWT-based entity identifiers and suggests using versioned REST paths for legacy v1 endpoints to maintain consistency with the OpenAPI specification.

Comment thread docs/guides/authorization-rest-api.mdx Outdated
Comment thread docs/guides/authorization-rest-api.mdx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

❌ Surge preview build failed — no preview was deployed. Check the workflow logs for details.

Once the build passes, the preview will be at: https://opentdf-docs-pr-285.surge.sh

Common cause: If the build failed on vendored YAML validation, run the following locally and commit the result:

npm run update-vendored-yaml
git add specs/
git commit -m "chore(deps): update vendored OpenAPI specs"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

❌ Surge preview build failed — no preview was deployed. Check the workflow logs for details.

Once the build passes, the preview will be at: https://opentdf-docs-pr-285.surge.sh

Common cause: If the build failed on vendored YAML validation, run the following locally and commit the result:

npm run update-vendored-yaml
git add specs/
git commit -m "chore(deps): update vendored OpenAPI specs"

Copy link
Copy Markdown

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great docs!

Comment thread docs/guides/authorization-rest-api.mdx
Comment thread docs/guides/authorization-rest-api.mdx Outdated
Comment thread docs/guides/authorization-rest-api.mdx Outdated
Comment thread docs/guides/authorization-rest-api.mdx
@opentdf opentdf deleted a comment from coderabbitai Bot Apr 24, 2026
marythought and others added 6 commits April 24, 2026 11:25
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix token entity identifier structure (top-level alternative to entityChain, not a field within it)
- Use versioned REST path /v1/authorization for legacy GetDecisions endpoint
- Add audience configuration warning for OIDC tokens
- Document DECISION_UNSPECIFIED alongside PERMIT and DENY
- Note 200-request hard limit on GetDecisionBulk
- Document index-matched bulk responses with no entity info
- Update vendored OpenAPI specs (authorization, kasregistry)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… fence

Wrap GetDecision, GetDecisionBulk, and GetEntitlements tab examples in
<details>/<summary> blocks so the page is easier to scan. Also wrap the
batching strategy TypeScript snippet and remove a stray ``` after the
index-matching caution admonition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Link each endpoint section and the endpoint reference table to the
corresponding auto-generated OpenAPI schema pages under
/OpenAPI-clients/authorization/v2/. Also add a top-level link to the
OpenAPI reference in the intro paragraph.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…es link

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought force-pushed the worktree-DSPX-2802-rest-api-guide branch from 23ba3a4 to ed01b18 Compare April 24, 2026 18:27
@marythought marythought marked this pull request as ready for review April 24, 2026 18:27
@marythought marythought requested review from a team as code owners April 24, 2026 18:27
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@marythought has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 28 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d56931f-6144-40a4-a441-e6eb1394ca3a

📥 Commits

Reviewing files that changed from the base of the PR and between a82f860 and 864728d.

📒 Files selected for processing (1)
  • docs/guides/authorization-rest-api.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-DSPX-2802-rest-api-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@jakedoublev jakedoublev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These enhancements are really great. I have a couple pieces of feedback before we merge.

Comment thread docs/guides/authorization-rest-api.mdx Outdated
Comment thread docs/guides/authorization-rest-api.mdx
Replace incorrect gRPC-Gateway reference with ConnectRPC (HTTP/1.1 and
HTTP/2 supported natively, no gateway needed). Add JWT validation
warning for integrator PEPs passing tokens to the authorization service.
Also includes previously staged v1-to-v2 migration details section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought merged commit 5eeb113 into main Apr 27, 2026
8 checks passed
@marythought marythought deleted the worktree-DSPX-2802-rest-api-guide branch April 27, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants