Wayfinder is hosted in AWS
This article covers granting Wayfinder access to an Azure Subscription (target subscription) when Wayfinder is installed in AWS (home account), and you're using Wayfinder's credentials for authentication.
Jump to the Quick Start section for steps on how to create a new Azure Cloud Access.
Overview
Workflow
Wayfinder's web interface provides you with the ARN value of Wayfinder's Workload Identity and an outline of the permissions Wayfinder need to manage cloud resources in the target account.
Use Wayfinder's terraform module to create the necessary Azure AD Managed Identity with Federated Credentials, Azure Role Definitions and Trust Relationship in the target subscription. Wayfinder's ARN is needed to create the trust relationship between the home account and target subscription. The permissions are needed to create the Azure Role Definitions. See a full list of Wayfinder's terraform module input values. You can also do this configuration manually.
Wayfinder's terraform module returns the Client ID of the Azure AD Managed Identity with federated credentials, that were created in the target subscription. This Client ID needs to pasted in the respective fields in Wayfinder's web interface or the relevant CRD fields (Kind:CloudAccessConfig) if you're using Wayfinder's CLI.
After you apply the cloud access configuration, either using Wayfinder's web interface or CLI, then Wayfinder will be able to use its own credentials to connect to the target subscription.
Home Account Details
Wayfinder's Workload Identity is the ARN of the AWS IRSA Role which trusts Wayfinder's Kubernetes Service Account. If you installed Wayfinder using Wayfinder's install terraform module, this will have been created for you during the install. If not, you need to provide the ARN value of Wayfinder's Workload Identity as a value to the Helm chart on installation.
You use this ARN value when you configure a trust relationship between the home account and the target account.
Use Wayfinder's web interface to locate Wayfinder's Workload Identity or look it up manually in AWS.
Target Subscription Details
You need to provide Wayfinder with the Client ID of the Azure AD Managed Identity with federated credentials in the target subscription.
The Azure AD Managed Identity with federated credentials in the target subscription needs to be correctly configured with the Azure Role Definitions containing the permissions Wayfinder need and a Trust Relationship to outline the trust between Wayfinder's workload identity (home account) and the Azure AD Managed Identity (target subscription).
Use Wayfinder's terraform module to configure the Azure AD Managed Identity with federated credentials on your behalf or create it manually in Azure. Wayfinder's web interface displays the input values for the terraform module on the sidebar when you reach the Step 4 - Permissions section. CLI users can use the wf describe cloudaccess --cloud-identity CLOUDIDENTITY-NAME --to-cloud TARGET-CLOUD --for-type ACCESS-TYPE --for-stage STAGE-NAME --for-workspace WORKSPACE-KEY -o tfvars
command.
CLI Quick Reference
Instruction | CLI Command |
---|---|
Create a workspace (only if Access Type is Kubernetes Cluster Provisioning) | wf create workspace WORKSPACE-KEY -s SUMMARY |
Create a stage (only if Access Type is Kubernetes Cluster Provisioning) | wf create stage STAGE-NAME -d DESCRIPTION |
View Cloud Access Configurations | wf get cloudaccessconfig -c CLOUD -w WORKSPACE-KEY |
Output the Cloud Access Configuration to console | wf get cloudaccessconfig CONFIG-NAME -o yaml |
Output the Cloud Access Configuration to file | wf get cloudaccessconfig CONFIG-NAME > ./PATH/TO/FILE.yaml |
Apply the Cloud Access Configuration from file | wf apply cloudaccessconfig -f ./PATH/TO/FILE.yaml |
View Cloud Permissions | wf get cloudpermissions |
View the Permissions of the specified Cloud Permission | wf describe cloudpermissions PERMISSION-NAME -c CLOUD -o JSON |
View input values for Wayfinder's terraform module | wf describe cloudaccess --cloud-identity CLOUDIDENTITY-NAME --to-cloud TARGET-CLOUD --for-type ACCESS-TYPE --for-stage STAGE-NAME --for-workspace WORKSPACE-KEY -o tfvars |
View cloud identities | wf get cloudidentities |
Output the details of the cloud identity to console | wf get cloudidentities NAME-OF-IDENTITY -o yaml |
Create a cloud identity for Wayfinder's workload identity (You only have to do this once) | wf create cloudidentity CLOUDIDENTITY-NAME --for-workload-identity |
[ADVANCED USERS] Create a Cloud Access Configuration | wf create cloudaccessconfig [flags] |
Considerations
For each subscription that you want to connect, you need to:
- Decide what type of cloud access you need.
- Decide the scope of the cloud subscription (workspace and stage).
Note that some access types are designated as 'administrative' for configurations that are outside the scope of any particular workspace or stage and are intended for Wayfinder administrators. - Decide what type of authentication method you want to use. This article outlines using Wayfinder's credentials (Azure AD Identity Based Access).
- Give Wayfinder cloud permissions to access cloud resources and perform relevant tasks. At this point you should have already run Wayfinder's terraform module to create the needed configuration and permissions in the target subscription (or have done this configuration manually). You need to verify that the permissions are assigned correctly by using Wayfinder's web interface.