Kyvos SaaS Portal Disaster Recovery Steps
This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here. |
|---|
Overview
This page provides a step-by-step guide for setting up Active-Passive Disaster Recovery (DR) for the Kyvos SaaS Portal on AWS, covering the creation and configuration of all required DR-region resources — RDS read replicas, Secrets Manager, SQS, MQ, S3 replication, AMI copies, and Elastic Beanstalk environments.
It also details the failover procedure, including promoting replicas to standalone, updating configurations and database URLs to point to the DR region, and recovering the SaaS Reporting Cluster with SSO and security settings.
Creating Resources for Active-Passive Disaster Recovery (DR) of the SaaS Portal
Before configuring Active-Passive Disaster Recovery (DR) for the SaaS Portal, create and configure the required AWS resources in the DR region. These resources ensure that the DR environment can be activated with minimal downtime during a failover event.
The following resources must be created and configured in the DR region:
Amazon RDS Read Replica
AWS Secrets Manager Secret Replication
Amazon SQS Queues
Amazon MQ Broker
Amazon S3 Bucket Replication
Amazon Machine Image (AMI) Replication
AWS Elastic Beanstalk Environment
Create VPC and DB subnet group
After these resources are provisioned, update the required configuration values and secrets to point to the DR-region resources before promoting the DR environment to active status.
Create an RDS Read Replica in the DR Region
Open the Amazon RDS console.
Switch to the primary AWS Region (for example, us-east-1).
Select the primary RDS instance.
Ensure that automated backups are enabled.
Click Actions > Create read replica.
Select the DR Region (for example, af-south-1) as the destination Region.
Configure the read replica using the same:
DB instance class
Storage type
Parameter group
Option group
Configure the VPC, subnet group, and security groups for the DR Region.
If encryption is enabled, select the appropriate KMS key in the DR Region.
Click Create read replica.
Wait for the replica status to become Available.
Replicate Secrets to the DR Region
Open AWS Secrets Manager.
Switch to the primary AWS Region (for example, us-east-1).
Select the secret to replicate.
Click Actions > Replicate secret to other Regions.
Select the DR Region (for example, af-south-1).
Select the KMS key to use for encryption in the DR Region.
Click Replicate secret.
Verify that the replicated secret is available in the DR Region.
Update the secret values with DR-specific configuration, as required.
On this page:
- 1 Overview
- 2 Creating Resources for Active-Passive Disaster Recovery (DR) of the SaaS Portal
- 3 Create an RDS Read Replica in the DR Region
- 4 Replicate Secrets to the DR Region
- 5 Create Amazon SQS Queues in the DR Region
- 6 Create an Amazon MQ Broker in the DR Region
- 7 Perform Active-Passive DR for the SaaS Portal
- 7.1 Verify the DR Environment Capacity
- 7.2 Promote the RDS Read Replica to a Standalone Database
- 7.3 Promote the Replicated Secret to a Standalone Secret
- 7.4 Update Environment Variables in the Elastic Beanstalk Environment
- 7.5 Update Database URLs for the DR Region
- 7.6 Enable Session Stickiness for the Target Group
- 7.7 Deploy the Application JAR File
- 8 Disaster Recovery of SaaS Reporting Cluster
Secret Values to Update After Promoting the Secret to Standalone
The following secret values must be updated after the DR resources are provisioned and the replicated secret is converted to a the standalone secret.
Note
The following parameters are currently not present in the primary region secret:
notification.sqs.onscreen-queue-urlsqs.email.queue.urlnotification.sqs.email-queue-url
Ensure that these parameters are added to the DR region secret before proceeding.
Secret | perform |
cluster.emr.deployment.template.url | Change region and bucket name in URL |
cluster.k8s.deployment.template.url | Change region and bucket name in URL |
dbUrl | Update the URL with the replicated DB URL |
sqs.queue.url | Update the URL with the new SQS URL |
sqs.email.queue.url | Update the Region in the existing URL |
sqs.cluster.queue.url | Update the value with new one |
notification.sqs.email-queue-url | Update the Region in the existing URL |
notification.sqs.onscreen-queue-url | Update the Region in the existing URL |
cluster.deployment.template.url | Change the URL with new S3 URl |
mq.host | change value with new endpoint (without port and protocol) Ex: old - b-10e25e73-bc5b-45e8-94db-1129558e2a11-1.mq.us-east-1.amazonaws.com New - b-5d2d7597-29e8-47b9-9d29-c8c8fc6675c9-1.mq.af-south-1.amazonaws.com |
mq.client.username | (user will be `saas-mq-user`) Step during the mq creation |
mq.client.passcode | Generation of passcode at the time of creation Note: Use the same username and passcode as in the primary environment. |
mq.system.username | (user will be `saas-mq-user`) Step during the mq creation |
mq.system.passcode | Generation of passcode at the time of creation |
intellicus.dns.mapped.url | (Cost analysis dashboard URL -- no need to change if same dns mapping is being used after Cost Analysis Dashboard Kyvos Cluster DR) |
azure.template.url | Update the new S3 link of replicated bucket |
Create Amazon SQS Queues in the DR Region
Open the Amazon SQS console.
Switch to the DR Region (for example, af-south-1).
Note the queue names and configuration settings of the SQS queues in the primary Region.
Click Create queue.
Select the same queue type as the corresponding primary queue (Standard or FIFO).
Configure the queue using the same settings as the primary queue:
Visibility timeout
Message retention period
Delivery delay
Maximum message size
Dead-letter queue configuration
Encryption settings
IAM access policies
Create the queue.
Repeat the procedure for each SQS queue required in the DR Region.
Note the queue URLs and ARNs for use in the DR environment configuration.
Note
Use the same queue names as the primary Region whenever possible.
Create an Amazon MQ Broker in the DR Region
Open the Amazon MQ console.
Switch to the DR Region (for example, af-south-1).
Click Create broker.
Enter a broker name. Use the same broker name as the primary Region, if available.
Configure the broker using the same settings as the primary broker:
Broker engine and version
Deployment mode
Instance type
Networking configuration
Security groups
Create the broker user and specify a username and password.
Complete the broker creation process.
Wait for the broker status to change to Running.
If a password was not configured during broker creation:
a. Open the broker details page.
b. Select Users.
c. Click Edit.
d. Create or update the user password.
e. Save the changes.Record the broker endpoint for use in the DR environment configuration.
S3 Bucket Replication
Buckets in the Dev account:
saas-public-mailboxes-blacklist
Buckets in the QA account:
kyvos-saas-terraform-bucket-qa
Buckets in the MS account:
aws-beanstalk-codecodepipeline-us-east-1-331425286429
Open the Amazon S3 console.
Switch to the primary Region (us-east-1).
Verify that the required source buckets are available.
Create corresponding buckets in the DR Region (af-south-1), if they do not already exist.
Enable versioning on both the source and destination buckets.
Open the source bucket and navigate to Management > Replication rules.
Click Create replication rule.
Select the destination bucket in the DR Region.
Configure the IAM replication role.
Enable replication for all objects.
Enable replication of delete markers, if required.
Save the replication rule.
Repeat the preceding steps for each bucket that requires replication.
Verify that replication is configured successfully.
Upload a test file to the source bucket and confirm that it is replicated to the destination bucket.
Verify that the bucket policies and permissions are correctly configured in the DR Region.
AMI Replication
Open the Amazon EC2 console.
Switch to the primary Region (us-east-1).
Navigate to AMIs.
Select the AMI currently used by the Elastic Beanstalk environment.
Click Actions > Copy AMI.
Select the DR Region (af-south-1) as the destination Region.
Specify an AMI name using the existing naming convention.
Configure the snapshot and encryption settings, as required.
Click Copy AMI.
Switch to the DR Region (af-south-1).
Wait for the copied AMI status to change to Available.
Note the AMI ID of the copied image.
Create an Elastic Beanstalk Environment in the DR Region
Open the AWS Elastic Beanstalk console.
Switch to the DR Region (af-south-1).
Create the application, if it does not already exist.
Create a new environment for the application.
Specify an environment name. Use the same name as the primary environment, if available.
Select the same platform and platform version as the primary environment.
Upload the same application version or deployment package used in the primary Region.
Configure the same environment type (Load Balanced or Single Instance).
Configure the same EC2 instance type and Auto Scaling settings.
Configure the same VPC, subnets, and security groups.
Configure the same environment variables and application settings.
Attach the same IAM instance profile and service role.
Configure the same load balancer settings and health checks.
Update the configuration to use the DR Region resources, including the RDS, MQ, SQS, and S3 endpoints.
Click Create environment.
Wait for the environment health status to become Green.
Validate application accessibility and functionality.
Perform smoke testing for the application UI and APIs.
Verify logs, monitoring, and overall application health in the DR Region.
Update the AMI for the Elastic Beanstalk DR Environment
Open a terminal with AWS CLI configured.
Run the following command to update the AMI used by the Elastic Beanstalk environment:
aws elasticbeanstalk update-environment \ --region af-south-1 \ --environment-name Kyvos-saas-portal-QA-env-1 \ --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value=<DR-AMI-ID>
For example:
aws elasticbeanstalk update-environment \
--region af-south-1 \
--environment-name Kyvos-saas-portal-QA-env-1 \
--option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value=ami-031dda554271eefddPerform Active-Passive DR for the SaaS Portal
Verify the DR Environment Capacity
Open the AWS Elastic Beanstalk console.
Switch to the DR Region (af-south-1).
Open the DR Elastic Beanstalk environment.
Navigate to Configuration > Capacity.
Verify the Auto Scaling configuration:
Minimum instances = 0
Maximum instances = as required for the DR environment
Confirm that no EC2 instances are currently running in the DR environment before initiating the DR process.
Promote the RDS Read Replica to a Standalone Database
Open the Amazon RDS console.
Switch to the DR Region (af-south-1).
Navigate to Databases.
Select the DR read replica.
Verify that the replication status is healthy.
Click Actions > Promote read replica.
Specify a backup retention period, if required.
Confirm the promotion.
Wait for the database status to change to Available.
Verify that replication has been removed and that the database is operating as a standalone instance.
Note the writable database endpoint.
Update the application or Elastic Beanstalk configuration to use the DR database endpoint.
Restart application services, if required.
Validate database connectivity and application functionality.
Promote the Replicated Secret to a Standalone Secret
Open AWS Secrets Manager.
Switch to the DR Region (af-south-1).
Open the replicated secret.
Verify that the secret is available in the DR Region.
Retrieve and review the secret values.
Update the secret values with DR-specific configuration.
Ensure that all DR endpoints and credentials are correctly configured.
Save the updated secret.
Verify that applications and services are using the updated secret.
Test database and API authentication using the updated secret.
Validate application connectivity.
Update Environment Variables in the Elastic Beanstalk Environment
Open the AWS Elastic Beanstalk console.
Switch to the DR Region (af-south-1).
Open the DR Elastic Beanstalk environment.
Navigate to Configuration.
Under Updates, Monitoring, and Logging, click Edit.
Add or update the environment variables required for the DR Region.
Update the following variables:
| Variable | Value |
terraform.s3.bucket | Dev - TERRAFORM_S3_BUCKET | like kyvos-saas-terraform-bucket-dev.af-south-1 |
| QA- TERRAFORM_S3_BUCKET | like kyvos-saas-terraform-bucket-qa.af-south-1
|
| Production- TERRAFORM_S3_BUCKET | like kyvos-saas-terraform-bucket-prod.af-south-1
|
email.blacklist.bucket | EMAIL_BLACKLIST_BUCKET_NAME | like saas-public-mailboxes-blacklist.af-south-1 |
aws.template.region | AWS_TEMPLATE_REGION | af-south-1 |
email.blacklist.region | EMAIL_BLACKLST_REGION | af-south-1 |
aws.secrets.manager.gcp-template-region | AWS_SECRETS_MANAGER_GCP_TEMPLATE_REGION | af-south-1 |
aws.secrets.manager.region | AWS_SECRETS_MANAGER_REGION | af-south-1 |
terraformBucket.s3.region | TERRAFORMBUCKET_S3_REGION | af-south-1 |
aws.secrets.manager.azure-template-region | AWS_SECRETS_MANAGER_AZURE_TEMPLATE_REGION | af-south-1 |
Click Apply.
Wait for the environment update to complete.
Verify that the environment health status changes to Green.
Validate application functionality using the updated DR configuration.
Update Database URLs for the DR Region
Connect to the bastion host using SSH.
Connect to the DR RDS instance using the following command:
psql --host=<DR-RDS-ENDPOINT> \
--port=5432 \
--username=postgres \
--dbname=kyvos_saas_dbEnter the database password when prompted.
Run the database update scripts in the DR RDS instance.
Execute the following SQL commands:
UPDATE kyvos_version
SET deployment_templateurl = REPLACE(deployment_templateurl, 'us-east-1', 'af-south-1')
WHERE deployment_templateurl LIKE '%us-east-1%';
UPDATE kyvos_version
SET deployment_templateurl = REPLACE(deployment_templateurl, 'kyvos-saas-prerequisites-ms', 'kyvos-saas-prerequisites-ms.af-south-1')
WHERE deployment_templateurl LIKE '%kyvos-saas-prerequisites-ms%';Validate the updated values by running:
SELECT deployment_templateurl FROM kyvos_version;Verify that the URLs contain:
af-south-1kyvos-saas-prerequisites-ms.af-south-1
Exit the database session.
Enable Session Stickiness for the Target Group
Open the Amazon EC2 console.
Switch to the DR Region (af-south-1).
Open Target Groups.
Select the target group associated with the DR Elastic Beanstalk load balancer.
Open the Attributes tab and click Edit.
Enable Stickiness.
Select Load balancer generated cookie as the stickiness type.
Configure the stickiness duration, as required.
Click Save changes.
Verify that stickiness is enabled.
Validate session persistence after logging in to the application.
Deploy the Application JAR File
Open the AWS Elastic Beanstalk console.
Switch to the DR Region (af-south-1).
Open the DR Elastic Beanstalk environment.
Click Upload and Deploy.
Select the application JAR file.
Enter a version label.
Click Deploy.
Wait for the deployment to complete.
Verify that the environment health status changes to Green.
Review the application logs for startup validation.
Verify that the EC2 instances are running the updated application version.
Access the application URL and validate functionality.
Perform smoke testing for the UI and APIs.
Confirm that the deployment completed successfully.
Disaster Recovery of SaaS Reporting Cluster
To disaster recovery of SaaS Reporting cluster, perform the following steps.
Retrieve the SSO private key from the Kyvos cluster and update it in the SaaS secret.
Create a connection to the SaaS RDS.
Deploy the SaaS CAB in the Kyvos cluster.
Configure HTTPS. (This step is not required for SaaS Kyvos clusters, as HTTPS is already enabled.)
Configure Cross-Site settings:
Go to Kyvos Manager > Network Security.
Click the three-dot menu.
Enter the SaaS Portal URL.
Change the SameSite attribute to None.
Configure Kyvos authentication:
Go to Security > Kyvos Authentication.
Click the three-dot menu next to Revert.
Add the following configuration:
{ "groupName": "SAAS-WorkbookAccess" }
In Kyvos Properties, add the following property:
Key:
EXT_AUTH_HEADER_IDValue:
sessionid
Set the
REFINE_USERNAME_FOR_SSOproperty to NO in Kyvos Properties.Add
secure="true"to the 8081 connector section in theserver.xmlfile. (This step is not required for HTTPS-enabled Kyvos clusters.)Go to Kyvos Manager > Data Security, upload the JAR file, specify the class
com.custom.AccountFilterProvider, and click Save.