ipinternalpage
GuideUpdated

How to protect Redoc API docs with Google SSO.

Start with the OpenAPI document, publish it as a read-only Redoc reference, and require a permitted Google identity before the API documentation is served.

Render OpenAPI as a Redoc-based reference
Require Google sign-in before serving docs
Choose workspace or selected-email access
Update the spec without changing the URL

Decide whether you need a viewer or a portal

Redoc Community Edition turns an OpenAPI description into readable web documentation. If teammates mainly need to browse endpoints, schemas, and examples, a private read-only viewer is simpler than a portal that also manages accounts, API keys, SDKs, and interactive requests.

  • Use a viewer for internal service references and pre-release contracts
  • Use a larger portal for external onboarding and API operations
  • Keep the scope explicit so documentation does not become an accidental credential console

Prepare a safe OpenAPI document

Validate the YAML or JSON document and inspect what the rendered reference will reveal. Server URLs, example payloads, security scheme descriptions, contact details, and vendor extensions can all expose internal context even when no credential is present.

  • Include a clear info.title and version
  • Remove real tokens, cookies, passwords, and customer identifiers
  • Review server URLs and examples for the intended audience
  • Publish separate specs when environments have different disclosure boundaries

Publish the spec as a private Redoc reference

internalpage validates supported OpenAPI files and can render them with ReDoc in read-only mode. ReDoc is the initial workspace default; choose it as a page override if this reference must keep that renderer even when the workspace default changes. Publish to a readable slug so the documentation can be referenced from runbooks, tickets, and service ownership records.

Sign in once
npx @internalpage/cli login
Publish the spec
npx @internalpage/cli publish ./openapi.yaml --slug specs/billing-api

Require the right Google identity

Choose workspace access when the API reference is useful across the company. Use selected-email access for a client, implementation partner, incident team, or pre-release review. The viewer checks permission before returning the rendered documentation.

  • Workspace access for broadly used internal APIs
  • Selected emails for a named review group
  • A separate page when the same spec needs a different audience

Test both allowed and denied paths

Open the final URL signed out, then sign in with an authorized account. Repeat with an unrelated Google account and verify that it cannot receive the document. Check custom-domain and internalpage URLs separately if both are distributed.

  • Signed-out visitors are sent to authentication
  • The allowed account sees endpoints and schemas
  • The denied account does not receive API content
  • No public asset URL reveals the source document

Keep the reference current

Republish to the same slug whenever the contract changes. For generated specs, run the publish command after validation in CI and keep the token in the CI secret store.

Update the same reference
npx @internalpage/cli publish ./openapi.yaml --slug specs/billing-api --json

Google SSO protects delivery but does not make secrets safe to document. Authorized viewers can inspect everything rendered in the page.

FAQ

Common questions

Do I need to host Redoc separately?

No. Upload the supported OpenAPI file and choose ReDoc as the workspace default or page override. Swagger UI and Scalar are also available for other pages.

Can external collaborators receive access without joining the whole workspace?

Yes. Grant selected-email access when the intended reviewers are known and should not receive workspace-wide access.

Can viewers try API requests from the page?

No. The internalpage OpenAPI experience is a read-only reference, not an interactive API console.

Will an update change the Redoc URL?

No. Publish the new valid spec to the same slug to update the existing private page.