Skip to content

feat: add license system with RSA-signed verification#36

Merged
datlechin merged 2 commits into
mainfrom
feat/license-system
Feb 7, 2026
Merged

feat: add license system with RSA-signed verification#36
datlechin merged 2 commits into
mainfrom
feat/license-system

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Add app-side licensing infrastructure with RSA-SHA256 signed payload verification
  • License tab in Settings for activation/deactivation with native macOS Form UI
  • Offline-first: cryptographic signature verification is local, 7-day periodic online re-validation with 30-day grace period

New Files

File Purpose
License.swift Model, signed payload types, API request/response types, LicenseError
String+SHA256.swift CryptoKit SHA256 helper
LicenseStorage.swift Keychain (license key) + UserDefaults (metadata) + IOKit machine ID
LicenseSignatureVerifier.swift RSA-SHA256 verification with bundled public key
LicenseAPIClient.swift URLSession HTTP client (activate/validate/deactivate)
LicenseManager.swift @MainActor ObservableObject orchestrator
LicenseSettingsView.swift Settings tab with native macOS Form UI
license_public.pem RSA public key (safe to distribute)

Modified Files

  • AppDelegate.swift — start periodic validation on launch
  • OpenTableApp.swift — add .licenseStatusDidChange notification
  • SettingsView.swift — add License tab

Test plan

  • Build succeeds (xcodebuild)
  • License tab appears in Settings (Cmd+,)
  • SwiftLint passes with 0 violations
  • Activate with valid key → shows email + masked key
  • Deactivate → returns to activation form
  • App works normally without a license (no feature gating)

- License model with signed payload types and offline caching
- RSA-SHA256 signature verification using Security framework
- Keychain storage for license key, UserDefaults for metadata
- IOKit machine ID (SHA256 hashed) for device identification
- URLSession API client for activate/validate/deactivate
- LicenseManager with offline-first verification and 7-day periodic re-validation
- License tab in Settings with native macOS Form UI
- Bundled RSA public key for offline signature verification
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 044b38f481

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread TablePro/Core/Services/LicenseManager.swift
Comment thread TablePro/Core/Services/LicenseManager.swift
@datlechin datlechin merged commit b181c58 into main Feb 7, 2026
@datlechin datlechin deleted the feat/license-system branch February 7, 2026 22:10
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.

1 participant