TrustPinMode

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:

  1. Phase 1: Deploy with PERMISSIVE mode to identify all domains

  2. Phase 2: Register critical domains in TrustPin dashboard

  3. Phase 3: Switch to STRICT mode for production security

Entries

Link copied to clipboard

Strict mode: Enforces certificate pinning validation for all domains.

Link copied to clipboard

Permissive mode: Allows selective certificate pinning validation.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

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.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.