Project Setup
Set up your TrustPin project and configure certificate pinning for your mobile application.
Prerequisites
Before you begin, ensure you have:
- A TrustPin account (Sign up )
- Access to your server’s SSL certificates
- Admin access to your domains
- A mobile application (iOS, Android, or Flutter)
Step 1: Create Your Account
Sign Up / Sign In
- Visit app.trustpin.cloud
- Click Sign In or Start Free Trial.
- Sign in using Google, GitHub, or create an account.
- After signing in, you’ll be taken to the TrustPin Dashboard.
Step 2: Create a Project
Projects organize your certificate pinning configurations by application.
Create New Project
- From the dashboard, click Create a new project
- Enter your project details:
- Organization: If you belong to multiple organizations, select the one for this project.
- Project name: e.g., “MyApp (Testing)”
- Click Next
- Select a type of Key Management and then click Next. You can choose between:
- Cloud Managed Key: Keys are created in your browser and encrypted with a password. The encrypted keys are stored server-side and can only be decrypted with your password. This option is especially useful for development and testing environments.
- Bring Your Own Key: Create and store an ECDSA P-256 key that is never uploaded. When required, use our CLI tool to sign your configurations locally and securely. The recommended choice for production applications.
- FIDO Protected Keys: An alternative to Cloud Managed Keys with FIDO protection.
- This next step depends on the selected key management type.
- After key management selection, enter a list of domains and/or sub-domains separated by comma.
- Click Create project
Cloud Managed Key
- Enter your master password. This password will be used to sign your project’s configuration. Store it securely.
- The generated public key corresponds to a private key generated in your browser.
- Click Next.
Bring Your Own Key
- Assign your key a Key ID.
- Generate the key pair using the suggested code.
- Copy the public key in PEM format where it’s required.
- Don’t forget to safely store your keypair, and never share the private key.
- Click Next.
FIDO Protected Keys
- Carefully review and acknowledge the implications of using FIDO.
- Mark the checkbox acknowledging the use of FIDO.
- Click Next and continue with the project setup until FIDO authentication is required.
Project Credentials
For any given project you will have:
- Organization ID: Your organization identifier
- Project ID: Unique project identifier
- Public Key: Base64-encoded ECDSA P-256 public key for signature verification
Important: You’ll need these to initialize the SDK. None of these three elements are considered sensitive information.
Step 3: Add Domains
Configure the domains your application will connect to.
Add a Domain
- Navigate to your project
- In the workflow steps on the left side, click Set up domains
- Click Add domain
- Enter your domain:
api.example.com - Click Add Domain
Domain Configuration
Click Edit to modify domains and their certificates. For each domain, you can add one or more certificates (for example, current and future certificates).
To add a new certificate to a domain, click Add Certificate. You can delete a specific certificate by clicking Delete in its box, or remove the entire domain by clicking Delete domain.
Each certificate can include the following fields:
- Expiration: When this certificate expires. If left blank, it will not expire.
- Fingerprint and SPKI: Information about the leaf certificate
- Issuer: Who issued this certificate
- Serial Number (optional): Serial number of the certificate
- Certificate Transparency Logs
At least one of the following should be defined in order to have a valid configuration:
- SHA256 fingerprint
- SHA512 fingerprint
- SPKI SHA256
- SPKI SHA512
Certificate fingerprint has precedence over SPKI info. For example:
- If you define the four fields, the SDK will do SHA256 fingerprint first.
- If you define one fingerprint and one SPKI, the SDK will test the fingerprint first.
- If you want to use SPKI, do not specify either SHA256 or SHA512.
Important: After making any changes, click Apply changes. These changes will be saved locally and not sent to devices. Your configuration reaches users’ devices only when you publish your configuration.
Pinning Methods
| Method | What’s Pinned | Use Case | Recommended |
|---|---|---|---|
| SPKI SHA-256 | Subject Public Key Info | Auto-managed certificates (ACM, Let’s Encrypt) | ✅ Preferred |
| SPKI SHA-512 | Subject Public Key Info | High-security apps with auto-managed certs | ✅ Yes |
| Leaf SHA-256 | Full certificate fingerprint | Manually managed certificates | When needed |
| Leaf SHA-512 | Full certificate fingerprint | High-security apps with manual certs | When needed |
Why SPKI Pinning is Preferred
SPKI (Subject Public Key Info) pinning is the recommended approach, especially for certificates managed automatically by services like AWS Certificate Manager (ACM) or Let’s Encrypt:
Advantages of SPKI Pinning:
- Survives certificate renewal: Pin remains valid when certificate is renewed with the same key pair
- Zero-downtime rotation: No need to update pins when certificates auto-renew
- OWASP recommended: Follows OWASP Mobile Security Testing Guide best practices
- Less maintenance: Ideal for automated certificate management systems
When to Use Leaf Certificate Pinning:
- You manually manage certificates and want stricter validation
- You need to pin the entire certificate chain
- Compliance requirements mandate full certificate fingerprinting
For AWS ACM, Let’s Encrypt, and other auto-renewal systems, always use SPKI pinning to avoid service disruptions when certificates automatically renew.
Hash Algorithm Selection
| Algorithm | Security Level | Performance | Recommended Use |
|---|---|---|---|
| SHA-256 | High (256-bit) | Fast (~1-5ms) | ✅ Most applications |
| SHA-512 | Very High (512-bit) | Moderate | Banking, healthcare, government |
Recommendation: Use SPKI SHA-256 for most applications. Upgrade to SPKI SHA-512 only if your security requirements specifically mandate stronger cryptographic guarantees.
Step 4: Publishing configuration
- In the workflow steps on the left side, click Publish config. This page provides an overview of your project status.
You can see the public key and the configuration file hosted on the CDN. The online configuration file has the information used by the SDK in your application to do certificate pinning.
When your project configuration differs from the online version, you can publish the new changes. After reviewing the configuration, click Publish.
Publishing the configuration may be disabled in the web dashboard if you selected Bring Your Own Key (BYOK). Remember that BYOK should be used alongside the CLI to sign configurations.
For Cloud Managed Keys and FIDO Keys click on Publish. Your master password or FIDO key will be required. After that, your configuration file will be updated.
Step 5: SDK Integration
Integrate TrustPin into your mobile application.
Choose Your Platform
Select the appropriate SDK for your platform and follow the instructions:
Best Practices
Security
- Never commit credentials to version control
- Use environment variables for sensitive data
- Enable strict mode in production
- Rotate pins before expiration
- Monitor pin validation failures
Configuration Management
- Separate projects for each environment
- Document domain configurations
- Keep certificates up to date
- Test in staging before production
- Use version control for configuration
Development Workflow
- Start with permissive mode during development
- Test all API endpoints with pinning enabled
- Validate configurations in staging environment
- Switch to strict mode before production release
- Monitor logs for issues
Troubleshooting Setup
Cannot Create Project
Issue: Project creation fails
Solutions:
- Check account permissions
- Verify email is confirmed
- Contact support if issue persists
Invalid Credentials Error
Issue: SDK initialization fails with INVALID_PROJECT_CONFIG
Solutions:
- Verify Organization ID is correct
- Check Project ID matches dashboard
- Ensure Public Key is properly base64-encoded
- Remove any whitespace from credentials
Certificate Upload Fails
Issue: Certificate upload returns error
Solutions:
- Verify certificate format (PEM, DER, etc.)
- Check certificate is valid (not expired)
- Ensure certificate matches domain
- Try uploading via different method (file vs paste)
Domain Not Accessible
Issue: Cannot add domain to project
Solutions:
- Verify domain ownership
- Check DNS is configured correctly
- Ensure domain uses HTTPS
- Verify firewall allows access
Next Steps
After completing setup:
- Deploy Your Application
- Learn How Certificate Pinning Works
- Explore CLI Tools
- Review Troubleshooting Guide
Support
Need help with setup?
- 📧 Email: support@trustpin.cloud
- 💬 Documentation: docs.trustpin.cloud
- 🎯 Dashboard: app.trustpin.cloud