Tech ONTAP Blogs
Tech ONTAP Blogs
With the July 2024 release, BlueXP Backup and Recovery service has included support for AWS IAM Roles Anywhere service in Technology Preview mode. This applies to backing up Cloud Volumes ONTAP to AWS and backing up on-premises ONTAP data to AWS.
IAM Roles Anywhere enables secure interaction between your external applications and AWS APIs by leveraging IAM roles, similar to how workloads running directly on AWS utilize IAM roles. This service provides temporary credentials for your on-premises infrastructure, including servers, containers, and other compute environments. By adopting IAM Roles Anywhere, you can eliminate the need for long-term AWS access keys and secret keys. This enhances security by reducing the risk of long-term credential exposure and simplifies the operational management of these credentials, including rotation and maintenance. This document serves as a step-by-step guide to assist you in deploying IAMRA and accessing AWS S3 for ONTAP backup and recovery using BlueXP
Advantages:-
Step 1: Create AWS Private Certificate Authority :
Establish a certificate authority to issue certificates for your resources.
Step 2: Create a Trust Anchor:
Generate a trust anchor (root certificate) for your certificate authority.
Step 3: Create a Role with a Trust Policy:
Configure the created role trust policies for Roles Anywhere. This allows workloads that have authenticated with Roles Anywhere Trust Anchor to assume roles.
Step 4:- Configure a Profile:
Create a profile to apply your roles to a roles session policy. The profile permissions are enforced on the role session when one or more roles are assumed by your non-AWS workload.
Step 5:- Generate Private Certificate
Generate the necessary Private Certificate (certificate.pem & private_key.pem) for your role.
Step 6:- Use the AWS Signing Helper to get session tokens
Leverage the signing helper to acquire temporary security credentials. Your external applications or compute platforms will need to request AWS to assume the IAM role. As part of this request, they will provide the necessary identity verification information, such as certificates or tokens issued by your trusted identity provider.
Step 7:- Use session credentials to get access to AWS resources
Upon successful verification of the identity, AWS will issue short-term credentials to the application. These credentials include an access key ID, a secret access key, and a session token, which the application can use to authenticate requests to AWS services.
Step 8: Manage Credential Lifecycle
The short-term credentials will have a limited lifetime, so your application or management tools will need to handle the lifecycle of these credentials. This includes monitoring credential expiration and automatically requesting new credentials as needed.
In this section, we will try to understand BlueXP backup and Recovery integration with AWS IAM Roles anywhere.
1. Set Up Trust and Roles:
2. Deploy the BlueXP Connector:
3. Create Additional Folders:
>mkdir netapp
> cd netapp
>mkdir cbs-iamra
Make sure we should have directory
/root/netapp/cbs-iamra/
and make file as.
/root/.aws/credential
4. Ensure CBS Container Access:
"composeOverrides": {
"cloudmanager_cbs": [
{
"property": "volumes",
"value": [
"/var/run:/var/run",
"/etc/hosts:/etc/hosts",
"/root/netapp/cbs-iamra:/opt/netapp/cbs/server/cbs-iamra",
"/tmp:/opt/netapp/shared:rshared"
]
}
]
}
5. Prepare for Certificate Issuance:
> cd /root/netapp/cbs-iamra
> touch iamra.json
> docker restart cloudmanager_cbs
6. Issue a Private Certificate:
aws acm-pca issue-certificate \
--validity Type=DAYS,Value=10
--signing-algorithm "SHA256WITHRSA" \
--csr fileb://csr.pem \
--template-arn arn:aws:acm-pca:::template/EndEntityCertificate_APIPassthrough/V1 \
--certificate-authority-arn arn:aws:acm-pca:us-east-1:111122223333:certificate-authority/11223344-1234-1122-2233-112233445566
Response:-
{
"CertificateArn":"arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/certificate_ID"
}
Download the certificate locally using the appropriate command.
aws acm-pca get-certificate \
--certificate-authority-arn arn:aws:acm-pca:us-east-1:111122223333:certificate-authority/11223344-1234-1122-2233-112233445566 \
--certificate-arn arn:aws:acm-pca:region:account:certificate-authority/CA_ID/certificate/certificate_ID | \
jq -r .'Certificate' > cert.pem
Make sure that the 2 files generated are stored in the directory "/root/netapp/cbs-iamra" folder.
7.Manage Certificate Renewal
Create certificate renewal scripts to generate a new certificate and secret key just before the certificate expiration time.
8. Install aws_signing_helper
Install package in : /root/netapp/cbs-iamra/ and install aws_signing_helper
>wget https://rolesanywhere.amazonaws.com/releases/1.1.1/X86_64/Linux/aws_signing_helper
> sudo apt-get install unzip
> Install awscli
curl " https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
> unzip awscliv2.zip
> sudo ./aws/install
> apt-get install jq
9. Generate Access Credentials:
$ ./aws_signing_helper credential-process \
--certificate /path/to/certificate \
--private-key /path/to/private-key \
--trust-anchor-arn arn:aws:rolesanywhere:region:account:trust-anchor/TA_ID \
--profile-arn arn:aws:rolesanywhere:region:account:profile/PROFILE_ID \
--role-arn arn:aws:iam::account:role/role-name-with-path
Output:-
{
"Version":1,
"AccessKeyId": String,
"SecretAccessKey": String,
"SessionToken": String,
"Expiration": Timestamp
}
--certificate
(string):- Path to certificate file--endpoint
(string):- The IAM Roles Anywhere endpoint for the region. For a list of endpoints, see Service endpoints and quotas.--region
(string):-Signing region.--private-key
(string):- Path to private key file.--profile-arn
(string):- Profile to pull policies from.--role-arn
(string):- Target role to assume.
--trust-anchor-arn
(string):- Trust anchor to to use for authentication.
10. Token Management:
11. Scheduled Tasks:
12. Ready to Go:
Previously, only FlexVol volumes directories could be restored, but you couldn't restore FlexGroup folders or directories. With ONTAP 9.15.1, the support for FlexGroup folder restores was added, and using the BlueXP Backup and Restore “Browse and restore” feature, you can now restore FlexGroup directories.
With this release, support for FlexGroup folder restore is a technology preview.
The FlexGroup Directory Restore feature is disabled by default. However, it can be enabled by following the steps below
Enable the feature by setting the flag:-
{
"feature-flags":
{
"flexgroup-volume-directory-restore" : true
}
}
> docker restart cloudmanager_cbs
The following configurations are not supported:-
With this release, you can now restore volumes that you created in ONTAP that are less than 1 GB. The minimum volume size that you can create using ONTAP is 20 MB.
The DataLock and Ransomware Scan feature offers robust protection for your backup files, safeguarding them from unauthorized modifications or deletions for a set duration, and alerts customers in the event of a ransomware attack on their cloud backups. This added layer of security is instrumental in defending your files against ransomware threats. However, activating this feature may lead to extra charges for the customer. To ensure that the customer is informed about the potential charges, the following steps have been implemented.
Now that you’ve read about this feature, we hope it entices you to go ahead try out this new preview feature .
If you would like more information, contact us [John Andathethu, Jacob (Jacob.A@netapp.com), Shweta Datha (shweta.datha@netapp.com)] and we would be happy to answer your questions.