Prime Onchain Wallet users can now deploy the server signer infrastructure to automate transaction co-signing instead of a manual mobile signing process. The solution offers a secure method for deploying and managing a key shard within your cloud environment, ensuring that critical signing operations are fully automated while maintaining strict security controls.
Transaction Signing: The Server-Signer connects to Coinbase Prime key management backend to facilitate automatic transaction signing. It adheres to the Prime Onchain Policy Engine rules and only signs transactions that you allow it to sign using the Coinbase Prime UI.
Intent Attestation: Our backend systems cryptographically verify and attest that your original transaction intent remains unchanged throughout processing. Even if one of our internal systems were compromised, we would still detect any modifications to your original intent.
Security: Key materials are backed-up by AWS with the Aurora DB backup policies. No single party ever holds a full private key. This approach leverages advanced cryptographic techniques to split key material between your infrastructure and our secure environment, ensuring that no single party has access to the complete private key. This provides extra security even if one’s systems are compromised.
By provisioning a server co-signer in AWS, you can achieve a fully automated workflow for your Prime Onchain Wallet.
Pre-requisite: User has already completed onboarding in the portfolio to be used for Prime Onchain Wallet (keys are generated and available on a mobile device) and has an active AWS Account that can be used to host a Server Signer EC2 instance.AWS CloudFormation will be used to setup all the necessary resources using a provided template. The template will configure the following resources:
EC2 Instance: Hosts the Server-Signer application and runs the initialization script.
Aurora PostgreSQL DB Cluster: Provides a managed database environment for storing encrypted key material and metadata.
AWS KMS Encryption Key: Used for encryption operations within the application.
AWS KMS Signing Key: Used for secure signing operations.
Wait Condition Resources: Allow the stack to pause until the EC2 instance completes its setup.
Step 3: Specify Stack Details During Stack Creation
When launching the CloudFormation stack, fill in the required parameters:
Stack Name: Enter a unique name for your stack (e.g., server-signer-prod or server-signer-learning). Keep it short (under 50 characters) as there is a maximum length limit on AWS resources.
ImageID: Use the default AMI ID (Amazon Linux 2 or Ubuntu as specified) or provide a custom AMI ID if preferred.
SSHIPRange: Configure the IP range from which you want to allow SSH access (for example, 10.0.0.0/8 or restrict it to your IP).
SSHKeyName: Select the key pair you created (e.g., my-debug-key).
Stack Failure Options: Under “Stack failure options,” select Delete all newly created resources so that any failure during creation cleans up the resources.
IAM Resource Acknowledgment: Check the box that acknowledges AWS CloudFormation might create IAM resources.
In the CloudFormation console, select your stack and go to the Outputs tab.
The EnrollData output contains the enrollment information returned by the newly created Server‐Signer instance. Copy the part of the output that contains enrollment data, ignoring any brackets or quotation marks. This will be used during server signer enrollment flow in Prime UI.
Server signer enrollment is complete now. You can initiate a transaction and verify that it gets automatically signed after the consensus approval is achieved.
If you encounter issues with your Server-Signer deployment or need to inspect logs for troubleshooting, follow these steps:1. Verify EC2 Instance Accessibility
Ensure the Instance Has a Public IP:
In the EC2 console, check that your instance has a public IPv4 address. If it doesn’t, verify that it is in a public subnet or use a bastion host to access it.
Confirm Security Group Settings:
Make sure the security group associated with your instance allows inbound SSH traffic (port 22) from your IP address. You can temporarily set the rule to allow SSH from 0.0.0.0/0 for testing (remember to restrict this later).
2. SSH into the EC2 Instance
Locate the SSH Key and Public IP
Ensure you have your private key file (e.g., server-signer-key-pair.pem) with proper permissions and note the public IP address of the instance from the EC2 console:
Copy
Ask AI
chmod 400 server-signer-key-pair.pem
Connect via SSH
For an Ubuntu instance, use the following command (replace [Public-IP] with the actual IP):
3. View Application Logs on the InstanceOnce logged in:
Run the command to load the Server-Signer environment variables:
Copy
Ask AI
source load-cdp-signer-env-vars
Use journalctl to follow the logs for the Server-Signer service
Copy
Ask AI
sudo journalctl -f -u cdp-signer
This command will display real-time log output from the cdp-signer service, allowing you to monitor the signing service’s activity and troubleshoot issues.
4. Additional Debugging Tips
Check System Logs: If the Server-Signer logs aren’t providing enough details, review general system logs (e.g., /var/log/syslog or /var/log/messages).
Review CloudFormation Events: In the CloudFormation console, review the Events tab for your stack to identify any resource creation or configuration errors.
Confirm Environment Variables: Double-check that all required environment variables (such as database connection details and KMS key identifiers) are set correctly in /etc/cdp-signer.env.
By following these steps, you should be able to SSH into your instance, inspect logs, and diagnose any issues with your Server-Signer deployment.
1. SSH into the EC2 InstancePlease refer to the Troubleshooting & Instance Debugging section to find more details on how to find your EC2 instance public IP and key-pair.
2. Update the binariesRun the following script to update the Server-Signer binary:
Copy
Ask AI
set -eSERVICE_NAME="cdp-signer"# Update the below URL with the latest version of the Server-Signer binary.SERVER_SIGNER_BINARY_URL="https://prime-onchain-wallet-server-signer-public.s3.us-east-1.amazonaws.com/templates/1.2.1/server-signer.yaml"TEMP_DIR="/tmp/new-binary"mkdir -p $TEMP_DIR && cd $TEMP_DIRcurl -o $TEMP_DIR/new-binary.zip $SERVER_SIGNER_BINARY_URLunzip -o $TEMP_DIR/new-binary.zipsudo dpkg -i $TEMP_DIR/cdp-signer_*_amd64.debsudo systemctl start $SERVICE_NAMEecho "Binary updated and service restarted successfully."
The binary is updated now and can be verified by creating a new wallet or signing with an existing one.