Trust Pin Mode
Defines the behavior for handling unregistered domains in TrustPin certificate pinning.
This enum controls how TrustPin behaves when attempting to verify certificates for domains that are not configured in your pinning configuration. The choice between modes affects both security posture and application flexibility.
Security Considerations
Choose your pinning mode based on your security requirements and application architecture:
Production applications: Use STRICT mode to ensure all connections are validated
Development/Testing: Use PERMISSIVE mode to allow connections to test servers
Hybrid applications: Use PERMISSIVE mode when connecting to dynamic third-party services
Usage Examples
Strict Mode (Production)
TrustPin.setup(
organizationId = "prod-org-123",
projectId = "mobile-app-v2",
publicKey = "LS0tLS1CRUdJTi...",
mode = TrustPinMode.STRICT // Recommended for production
)Permissive Mode (Development)
TrustPin.setup(
organizationId = "dev-org-456",
projectId = "mobile-app-staging",
publicKey = "LS0tLS1CRUdJTk...",
mode = TrustPinMode.PERMISSIVE // Allows unregistered domains
)Migration Strategy
When implementing certificate pinning in existing applications:
Phase 1: Deploy with PERMISSIVE mode to identify all domains
Phase 2: Register critical domains in TrustPin dashboard
Phase 3: Switch to STRICT mode for production security
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.