CruiseAPI
Home › Technical Guides › Security & Auth
Security & Auth

Bearer Token Security, Sandbox Isolation & Rate-Limiting Tiers

Protect agency credentials, test safely in isolated sandboxes, and manage burst search traffic without hitting 429 throttles.

Bearer Token Lifecycle and Least-Privilege Scopes

Enterprise travel platforms routinely separate customer-facing search microservices from back-office finance and booking workers. Issuing scoped Bearer tokens—such as voyages:read for storefront search versus reserve:write and operations:write for checkout services—limits blast radius if a frontend edge worker or integration script is ever compromised.

All API traffic must traverse TLS 1.2+ exclusively, with Bearer tokens transmitted strictly in the Authorization header rather than URL query parameters where credentials risk leaking into proxy logs or browser histories.

  • Bind production keys to specific scopes and outbound IP allowlists where possible.
  • Rotate API credentials quarterly with overlapping dual-key grace periods.
  • Never embed secret Bearer tokens in client-side browser JavaScript bundles.

Isolated Sandbox Environments vs. Production

Testing booking commits or cancellation penalties against live cruise line CRS nodes risks creating phantom reservations and real agency debit memos. An isolated sandbox environment mirrors production JSON schemas, deterministic error codes, and simulated webhook triggers using synthetic test PNRs.

Developers can exercise edge cases—such as HTTP 409 fare changes, expired quote tokens, and GTY cabin assignments—predictably in CI pipelines before promoting credentials to production.

Token-Bucket Rate Limiting and Header Awareness

To shield upstream maritime suppliers from runaway scrapers, API gateways enforce token-bucket rate limits that allow short bursts while capping sustained request rates. Clients should inspect X-RateLimit-Remaining and HTTP 429 Retry-After headers, applying jittered backoff rather than tight retry loops.

Environment & Rate-Limit Tier Comparison

Environment / TierBase URL ScopeBurst / Sustained QuotaPrimary Use Case
Sandboxsandbox-api.cruiseapi.org30 req/s burstCI tests & integration QA
Starter B2Bapi.cruiseapi.org60 req/s burstBoutique agencies & portals
Growth OTAapi.cruiseapi.org250 req/s burstMulti-brand travel storefronts
Enterprise DedicatedIsolated clusterCustom SLA + dedicated poolsHigh-volume global OTAs
Checkout / Reserveapi.cruiseapi.orgDedicated write bucketProtected booking commits

Read endpoints (/v2/voyages) and write endpoints (/v2/reserve) use separate rate buckets so search spikes never block checkout.

Worked Illustration: Back-End Token Proxy Pattern for SPAs

This worked illustration keeps Bearer credentials off the browser in a React/Vue storefront:

  1. Browser submits itinerary search parameters to the agency's own lightweight BFF (Backend-for-Frontend) route.
  2. The BFF attaches the server-side Authorization: Bearer <token> header and calls /v2/voyages over TLS.
  3. BFF inspects X-RateLimit-Remaining; if HTTP 429 occurs, it serves stale-while-revalidate cached results or honors Retry-After.
  4. Sanitized sailing JSON returns to the React UI with zero API secrets exposed in browser DevTools.

Worked Illustration Summary: Routing calls through a thin server-side proxy eliminates credential exposure and centralizes rate-limit handling.

API Security & Compliance Checklist

  • Keep all Bearer tokens in server-side secret managers, never in client JS.
  • Enforce TLS 1.2/1.3 and strict Authorization header transmission.
  • Use scoped tokens separating read-only discovery from booking commits.
  • Run automated integration suites exclusively against sandbox credentials.
  • Honor HTTP 429 Retry-After headers with exponential backoff plus jitter.
  • Minimize passenger PII retention in logs to stay aligned with GDPR and PCI-DSS.

Frequently Asked Questions

Can I call CruiseAPI directly from browser JavaScript?

No. Exposing production Bearer tokens in client-side code lets third parties abuse your rate limits and make unauthorized bookings. Always proxy requests through your backend or serverless function.

Do sandbox bookings trigger real cruise line inventory holds?

No. Sandbox endpoints execute against simulated maritime inventory and never touch live cruise supplier CRS systems.

How do I prevent search bots from exhausting my /v2/reserve quota?

Search and booking endpoints sit in separate rate buckets, and adding edge caching plus bot protection in front of your storefront protects search capacity.

What PCI-DSS scope applies when transmitting passenger payments?

Use tokenized payment references rather than raw PAN card numbers whenever possible so your core booking servers stay out of full PCI cardholder-data scope.

Primary Standards & Industry References

  • RFC 6750 — The OAuth 2.0 Authorization Framework: Bearer Token Usage
  • PCI Security Standards Council — PCI-DSS v4.0 Tokenization Guidelines
  • OWASP API Security Top 10 (API2: Broken Authentication & API4: Unrestricted Resource Consumption)

Related Technical Guides