Permissions & Security
Charter enforces strict operational access control through CharterAccess, prevents concurrent double-bookings with CharterWriteLock, and guarantees broker/owner confidentiality in public share links.
All 3 RBAC Permissions (CharterAccess)
Section titled “All 3 RBAC Permissions (CharterAccess)”| Constant | Permission Name | Granted Capabilities |
|---|---|---|
PERMISSION_VIEW |
charter-view |
Read-only access to Setup -> Charter: Overview, Inquiries, Bookings Calendar, Fleet, Catalogs, Rates Manager, and Command Palette search (CharterCommandSearch). |
PERMISSION_MANAGE |
charter-manage |
Full operational brokerage access: create/edit inquiries, bookings, yachts, catalogs, convert inquiries, recalculate bookings, expire holds, save/bulk-adjust rates, export CSV/JSON/ICS, and invoke AI charter_schema / charter_save_yacht tools. |
PERMISSION_ADMIN |
charter-admin |
Administrative access to Charter Settings (charter-settings), overlap overrides (allow_overlap_override in AvailabilityEngine::assertAvailableForSave()), and system configuration. |
Concurrency, Proposal & Import Security Controls
Section titled “Concurrency, Proposal & Import Security Controls”| Layer | Security Control |
|---|---|
| Double-Booking Prevention | CharterWriteLock::run() / runMulti() acquires DB-name-scoped multi-dialect advisory locks (GET_LOCK on MySQL/MariaDB, pg_advisory_xact_lock on PostgreSQL, serialized transaction on SQLite; 5s timeout) in strictly ascending lock order. |
| Rates Concurrency & Body Caps | ProcessCharter enforces a 524,288-byte (512 KiB) JSON body cap and CSRF validation on ./rates-save/ and ./rates-bulk/, plus setExpectedModified optimistic locking in RateMatrixService::saveYachtRates(). |
| Proposal Redaction | QuoteProposalRenderer signs tokens via HKDF-SHA256 (Charter:proposal-signing-v1, TTL clamped [60, 31536000]), verifies live/non-hidden status (isLive() && !$isHidden), and never prints internal_notes, commission_percent, owner_name, owner_contact, captain_name, captain_phone, captain_email, or private_notes. Unbranded views also hide agency branding, client name, and request_notes. |
| JSON Importer Guards | CharterImporter rejects symlinks, confines realpath() inside permitted root directories, enforces a 2 MiB JSON cap, sanitizes filenames with basename(), and rolls back copied media on persistence failure. |
| Email Header Hygiene | CharterNotifier sends exclusively via WireMail, sanitizes headers (sanitizeHeader()) against CRLF/null injection, HTML-encodes values, and deduplicates 24-hour hold expiry notices in WireCache (Charter.HoldNotice, 7-day TTL). |