Cloud Accounts
Overview
A cloud account is a mapping between your org and a cloud provider. When creating a cloud account, instructions are provided on how to create a bridge account at the cloud provider with minimum access permissions. This bridge account is used by Control Plane to query and manage the necessary resources at the cloud provider on behalf of your org.
Cloud accounts are scoped to an org and are used in conjunction with identities to set up cloud access rules.
Your workload can then be associated with an identity and will then have the ability to call any of the allowed cloud provider resources transparently without any additional set up.
For example, if your application uses AWS S3 for storage and Azure Cosmos DB for its database, your workload will be able to access both no matter which location the workload is deployed to. The workload calls each resource as if it had a direct connection and the identity will route the request seamlessly to the proper location.
Create a Cloud Account
Refer to the Create a Cloud Account guide for additional details.
AWS Details
-
Cloud Account Creation
- When registering a cloud account targeting AWS, your AWS administrator will manually create a new AWS role (named
cpln-ORG_NAME
) with the following policies:- Create a new policy named
cpln-connector
which has the necessary access to create and manage roles. ReadOnlyAccess
which “provides read-only access to AWS services and resources”.
- Create a new policy named
- A “trust relationship” is associated with this role that allows the Control Plane AWS account to assume this role.
- When registering a cloud account targeting AWS, your AWS administrator will manually create a new AWS role (named
-
Identity Creation
- When an identity is created targeting AWS, Control Plane will create a new role in AWS that will have the minimum permissions that are required to access the targeted services. When a workload that is assigned with an identity requests credentials to access AWS services, Control Plane will obtain a temporary access token that impersonates the role and inject it into the workload granting it access.
-
Removing an AWS Cloud Account
- If you no longer require Control Plane to create identities targeting AWS:
- Delete all cloud access rules targeting AWS from existing workload identities. This will delete any associated roles.
- Delete the cloud account.
- Your AWS administrator will need to remove the
cpln-connector
policy and thecpln-ORG_NAME
role.
- If you no longer require Control Plane to create identities targeting AWS:
Azure Details
When registering a cloud account targeting Azure, you can choose from the following methods:
- Azure SDK
- Access tokens are minted using an Azure Service Principal.
- Azure Connector
- An Azure Function App acts as a bridge that calls internals Azure APIs to obtain access tokens.
During the creation of an Azure cloud account, the Azure CLI generates credentials that are used by Control Plane when connecting to Azure to provision apps or user identities that will be used by workload identities. These credentials are uploaded and stored securely as an Azure-SDK secret or Azure-Connector secret and can be viewed by clicking Secrets
from the left menu in the console after creating an Azure cloud account.
Azure SDK
- Cloud Account Creation
- When registering a cloud account targeting Azure using the Azure SDK, an Azure Service Principal is created by your Azure administrator using the Azure CLI. The output of the Azure CLI command are credentials that are uploaded, stored securely, and assigned to the cloud account.
- The name of this service principal is the name of your org prefixed with
cpln-
(i.e., cpln-ORG_NAME). - The only Azure API permission required by this principal is
Application.ReadWrite.OwnedBy
(which belongs to the Microsoft Graph API). - By granting this permission, the cloud account will be able to create/manage App registrations and query available Azure scopes and roles during the creation of an identity.
The permissions Application.ReadWrite.OwnedBy
“allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user. It cannot update any apps that it is not an owner of”.
For every identity created, Control Plane creates an App registration for which it generates short-lived credentials and injects them into your workload using the native cloud providers identity interface. No matter which cloud your workload is running, Control Plane ensures that the identity information is conveyed correctly to the consumed services. Control Plane mints tokens for the identity bound to the workloads.
-
Identity Creation
- When creating an identity, cloud access rules targeting Azure can be defined which specify the minimum access needed by the identity. When the identity is saved in the console, the Azure cloud account will leverage the service principal to create a new App registration with the configured access.
- Any workload can be configured to use this identity and will have access to the defined resources.
-
Expired / Compromised Credentials
-
If the service principal credentials that were assigned to the cloud account expires or have been compromised, perform the following:
- From the Azure portal:
- Click
Azure Active Directory
and clickApp registrations
in the left menu. - Click
All applications
and then click the app registration namedcpln-ORG_NAME
. - Click
Certificates & secrets
and then clickNew client secret
and follow the wizard. - Copy the value of the new secret to the clipboard.
- Delete the old secret.
- Click
- From the Control Plane console:
- Click
Secrets
in the left menu and select theazure-sdk
secret that belongs to the cloud account (it will be named CLOUD_ACCOUNT_NAME-access). - Click the
Edit Data
button and then click the eye icon. - Update the
clientSecret
property with the value of the new secret by pasting it from the clipboard.
- Click
- From the Azure portal:
-
Until a valid secret value has been updated, Control Plane will not be able to manage workload identities.
-
-
Removing an Azure Cloud Account
-
If you no longer require Control Plane to create identities targeting Azure:
- Delete all cloud access rules targeting Azure from existing workload identities. This will delete any associated app registrations.
- Delete the cloud account.
- Delete the azure secret that was mapped to the cloud account (named: CLOUD_ACCOUNT-access).
- Your Azure administrator will need to delete the Service Principal from Azure by running the following Azure CLI command:
-
Azure Connector
-
Cloud Account Creation
- When registering a cloud account targeting Azure using the console, your organization’s Azure administrator will use the Azure CLI to perform the following:
- Create an
Azure Function App
using an existing resource group and storage account. - Download the Control Plane Azure connector code.
- Deploy the code to the function app.
- Obtain the URL of the deployed function.
- Obtain the code/key of the deployed function.
- Create an
- After the registration is completed, a secret of type azure-connector will be created. This secret can be reused to create another cloud account (using the same Function App) or if an existing cloud account was inadvertently deleted.
- When registering a cloud account targeting Azure using the console, your organization’s Azure administrator will use the Azure CLI to perform the following:
-
Functionality
- The Function App that is deployed has a function called
iam-broker
. This function is called by Control Plane to obtain and inject the access token on behalf of the calling workload. - The Function App is set as an
Owner
of the subscription. This role assignment is needed to create the managed identities.
- The Function App that is deployed has a function called
-
Identity Creation
- When an identity is created targeting Azure resources, a managed identity is assigned to the function so that the function can act on its behalf. This identity will only have the minimum permissions that are required to access the targeted services. When an identity is assigned to a workload that requests access to an Azure resource, Control Plane will obtain a temporary access token that impersonates the roles and inject it into the workload granting it access.
-
Pricing
- The App Function runs as a managed service and is subject to charges against your Azure subscription.
- Please visit the Azure Function Pricing page to view the current pricing.
-
Compromised Code
-
If the Function App code has been compromised, perform the following:
- From the Azure portal:
- In the search bar, enter
Function App
and click the first result. - Click the app to update and click
Functions
. - Click
iam-broker
and then clickFunction Keys
. - For the
default
Function Key, clickRenew key value
. A confirmation modal will be displayed, clickRenew
. - After the new key has been generated, click the link
Hidden value. Click to show value
. - Copy the value of the new code to the clipboard.
- In the search bar, enter
- From the Control Plane console:
- Click
Secrets
in the left menu and select theazure-connector
secret that belongs to the cloud account (it will be named CLOUD_ACCOUNT_NAME-access). - Click the
Edit Data
button and then click the eye icon. - Update the
Code
property with the value of the new code by pasting it from the clipboard.
- Click
- From the Azure portal:
-
Until a valid code has been updated, Control Plane will not be able to manage workload identities.
-
-
Removing an Azure Cloud Account
-
If you no longer require Control Plane to create identities targeting Azure:
- Delete all cloud access rules targeting Azure from existing workload identities. This will delete any user assigned identities.
- Delete the cloud account.
- Delete the azure connector secret that was mapped to the cloud account (named: CLOUD_ACCOUNT-access) if it is not being used by another Cloud Account.
- Your Azure administrator will need to delete the Function App from the Azure portal or by running the following Azure CLI command:
-
GCP Details
-
Cloud Account Creation
- When registering a cloud account targeting GCP, your GCP administrator will add the Control Plane GCP service account as a member of your GCP account with the following roles:
Viewer
Service Account Admin
Service Account Token Creator
- The Control Plane GCP service account is in the format:
cpln-ORG_NAME@ENV.iam.gserviceaccount.com
.
- When registering a cloud account targeting GCP, your GCP administrator will add the Control Plane GCP service account as a member of your GCP account with the following roles:
-
Identity Creation
- When an identity is created targeting GCP, Control Plane will create a new
Service Account
in your GCP account that will have the minimum permissions that are required to access the targeted services. - When a workload that is assigned with an identity requests credentials to access GCP services, Control Plane will obtain a temporary access token that impersonates the service account and inject it into the workload granting it access.
- If the identity created connects with a particular GCP service, the Control Plane GCP service account will need to be granted the
Admin
role for that service.- For example, if the identity will be using Cloud Store, the
cpln-ORG_NAME@ENV.iam.gserviceaccount.com
service account needs to have theStorage Admin
role granted to it. By adding this role, Control Plane will be able to grant temporary access token to the workload when reading/writing to a storage bucket. - Control Plane will not be able to assign roles similar to
Compute Network User
because theCompute Admin
was not assigned to thecpln-ORG_NAME@ENV.iam.gserviceaccount.com
service account.
- For example, if the identity will be using Cloud Store, the
- When an identity is created targeting GCP, Control Plane will create a new
If your workload identities will be using a lot of GCP services, instead of granting the Admin
role for each service, it will be easier to grant the cpln-ORG_NAME@ENV.iam.gserviceaccount.com
service account the Owner
role.
- Removing a GCP Cloud Account
- If you no longer require Control Plane to create identities targeting GCP:
- Delete all cloud access rules targeting GCP from existing workload identities. This will delete any associated service account.
- Delete the cloud account.
- Remove the Control Plane user from your GCP account.
- If you no longer require Control Plane to create identities targeting GCP:
Permissions
The permissions below are used to define policies together with one or more of the four principal types:
Permission | Description | Implies |
---|---|---|
browse | Browse account contents | view |
create | Create new cloud accounts | |
delete | Delete existing cloud accounts | |
edit | Modify existing cloud accounts | view, browse |
manage | Full access | browse, create, delete, edit, manage, view |
view | Read-only access |
Access Report
Displays the permissions granted to principals for the cloud account.
CLI
To view the CLI documentation for cloud accounts, click here.