A macOS application for managing restic backups with a clean, modular architecture.
rBUM/
βββ Core/ # Core framework
β βββ Core.docc/ # Documentation catalog
β βββ Sources/
β β βββ Errors/ # Error type definitions
β β β βββ KeychainError.swift
β β β βββ SandboxError.swift
β β β βββ SecurityError.swift
β β β βββ ServiceError.swift
β β βββ Logging/ # Logging infrastructure
β β βββ Models/ # Core data models
β β βββ Protocols/ # Core protocols
β β β βββ KeychainServiceProtocol.swift
β β β βββ SecurityServiceProtocol.swift
β β β βββ ResticXPCServiceProtocol.swift
β β βββ Services/ # Core services
β β βββ KeychainService.swift
β β βββ SecurityService.swift
β β βββ ResticXPCService.swift
β β βββ Mock/ # Mock services
β β βββ DummyXPCService.swift
β βββ Tests/ # Core framework tests
β βββ Mocks/ # Test mocks
β βββ SandboxTests/ # Sandbox compliance tests
β βββ XPCTests/ # XPC service tests
βββ CoreTests/ # Additional core tests
β βββ Mocks/ # Mock implementations
β βββ Models/ # Model tests
β βββ Protocols/ # Protocol tests
β βββ Services/ # Service tests
β βββ XPCTests/ # XPC integration tests
βββ rBUM/ # Main application
β βββ Services/
β β βββ Security/ # Security services
β β β βββ KeychainCredentialsManager.swift
β β βββ Storage/ # Storage services
β βββ ViewModels/ # View models
β βββ Views/ # SwiftUI views
βββ rBUMTests/ # Main app tests
βββ Services/ # Service tests
The project implements a robust security architecture with the following components:
-
KeychainCredentialsManager
- Manages secure storage of repository credentials
- Uses KeychainService for sandbox-compliant operations
- Handles XPC service integration for secure access
-
KeychainService
- Implements secure keychain operations
- Manages access groups for XPC sharing
- Ensures sandbox compliance
-
SecurityService
- Handles security-scoped bookmarks
- Manages secure operations through XPC
- Validates service access and permissions
-
ResticXPCService
- Executes privileged operations
- Manages secure inter-process communication
- Handles process lifecycle and permissions
The security architecture ensures:
- Proper sandbox compliance
- Secure credential management
- Clear separation of concerns
- Protocol-oriented design
- Testability through mocks
- Platform-agnostic interfaces and models
- Core business logic
- Protocol-based design for flexibility
- macOS-specific implementations
- System framework integrations
- Sandbox-compliant services
- Secure credential management
- Backup scheduling and monitoring
- Repository management
- Snapshot handling
- Secure XPC communication:
- Version-controlled interface
- Security validation
- Resource access control
- Timeout handling
- Error propagation First created: 6 February 2025 Last updated: 6 February 2025
- Xcode 15.0+
- Swift 5.9.2
- macOS 14.0+
- Open
rBUM.xcodeproj
in Xcode - Build the project (βB)
- Run the app (βR)
- The XPC service is embedded in the main application
- Service requires Core.framework dependency
- Testing through
CoreTests
XPC test suite - Security considerations:
- Proper entitlements required
- Sandbox compliance
- Security-scoped bookmarks
- Audit session validation
Please see CONTRIBUTING.md for guidelines.
[Your license here]