Skip to content

Commit 7c895f0

Browse files
mintlify[bot]gsavage
authored andcommitted
feat: add docs for Kosli Capture Managed Service
The Kosli Capture Managed service is still in the design phase, so the content here is marked as "BETA". This PR adds documentation on the overall service, how to get started with it, and how it is secured. The purpose of making the documentation available, merged, before the build is complete is to allow our customers to provide feedback on the overall design and security of the solution.
1 parent 555f97b commit 7c895f0

6 files changed

Lines changed: 224 additions & 2 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "Getting started with Kosli Capture"
3+
sidebarTitle: "Getting started"
4+
description: "Learn how to configure Kosli Capture for your organization"
5+
tag: "BETA"
6+
---
7+
8+
<Warning>
9+
Kosli Capture is still in active development. Its capabilities and configuration format may change, and onboarding is done together with Kosli's Customer Success team.
10+
</Warning>
11+
12+
Kosli Capture is a managed service that runs on Kosli's infrastructure and connects to your cloud platform to observe the resources deployed there. To get set up with Kosli Capture you need to grant permissions to Kosli's cloud account and enable Kosli Capture within your Kosli org.
13+
14+
## Overview
15+
16+
Getting started with Kosli Capture involves two stages:
17+
18+
<Steps>
19+
<Step title="Prepare your environment">
20+
Create an IAM role in your AWS account specifically for Kosli Capture. Kosli provides a CloudFormation template to simplify this process. The template requires a shared secret, which Kosli provides to you.
21+
</Step>
22+
<Step title="Enable Kosli Capture">
23+
Enable Kosli Capture for your Kosli org, and the regular snapshots appear in Kosli.
24+
</Step>
25+
</Steps>
26+
27+
## Prepare your environment
28+
29+
In order for Kosli Capture to reach into your cloud, to discover your ECS clusters and Lambdas, you need to grant permission to Kosli to do so. Within AWS this requires the creation of an IAM role that Kosli can assume; the role will exist within your AWS account.
30+
31+
To simplify this process, Kosli has created a CloudFormation template that contains a role with the minimum set of permissions needed by Kosli Capture. The role can be assumed by Kosli and is protected by an external Id; each organization within Kosli has its own external Id. The CloudFormation template can be downloaded from the Settings page for your organization within the Kosli UI.
32+
33+
The CloudFormation template can be deployed within an AWS account, or can be attached to an AWS Organizational Unit (OU) as a StackSet; this latter option ensures the correct IAM permissions are rolled out to all AWS accounts within the OU.
34+
35+
When used, the CloudFormation template will send your AWS account id to Kosli, so that we are automatically notified that your account is ready to be included in Kosli Capture. Similarly, if you delete the CloudFormation stack we will be notified and know that the account is no longer to be included.
36+
37+
## Enable Kosli Capture
38+
39+
When you have created the IAM role, using the CloudFormation template, you can activate Kosli Capture within the Kosli user-interface. Kosli Capture runs on a five-minute schedule, and once you have enabled it, Kosli Capture will pick up your environment the next time it runs - you should see environments and snapshots appearing within a few minutes.
40+
41+
## Excluding resources
42+
43+
If there are resources you do not wish to include within a Kosli Capture Managed snapshot, for example an ECS cluster that you consider to be out of scope, you can add an AWS tag to it indicating that the item should be skipped. Adding a tag with the name `kosli.capture` and the value `false` will ensure that Kosli Capture skips over that resource.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "Kosli Capture Managed Service"
3+
sidebarTitle: "Kosli Capture"
4+
description: "Learn how the Kosli Capture Managed Service snapshots your cloud environments from Kosli's infrastructure, with no software to install."
5+
tag: "BETA"
6+
---
7+
8+
<Warning>
9+
Kosli Capture is still in active development. Its capabilities and configuration format may change, and onboarding is done together with Kosli's Customer Success team.
10+
</Warning>
11+
12+
Kosli Capture is a managed service that runs on Kosli's infrastructure and connects to your cloud platform to observe the resources deployed there. You grant Kosli Capture a set of permissions, and it uses them to run a `kosli snapshot` every few minutes against the infrastructure you have allowed it to scan.
13+
14+
Kosli also supports reporting from your own cloud accounts by running the Kosli CLI on a schedule. Kosli Capture inverts this, with Kosli running the regular [snapshots](/getting_started/environments) so there is no software for you to install.
15+
16+
To set it up for your organization, see [Getting started with Kosli Capture](/administration/kosli_capture/getting_started).
17+
18+
## Overview
19+
20+
Kosli Capture connects to your cloud accounts using permissions that you manage. You configure Kosli Capture by activating it for different AWS services, and Kosli Capture uses the permissions to regularly reach into your estate and record snapshots, sending the data into your Kosli organization. Kosli Capture uses details about your infrastructure, such as the name of an ECS cluster, to build environments within Kosli.
21+
22+
## Security
23+
24+
The security of your cloud infrastructure is the primary driver behind the internal architecture of
25+
Kosli Capture. You grant a read-only IAM role in your account, protected by an external ID that acts
26+
as a shared secret between Kosli and you. On Kosli's side, each Kosli Capture job runs under a role
27+
scoped to your organization alone, so a worker running for another customer cannot reach your cloud
28+
account. Kosli Capture holds no customer data; snapshots go straight to Kosli through the same ingest
29+
path as your existing pipelines. See [Kosli Capture Security](/administration/kosli_capture/security)
30+
for the isolation model and the full list of permissions.
31+
32+
## Hands-off operation
33+
34+
Kosli Capture has been designed to operate with no on-going support from you. Once the initial security permissions have been created, Kosli Capture will continue to operate in a headless mode. Monitoring, maintenance and rotation of API keys is all handled automatically. As your cloud infrastructure changes over time, Kosli Capture will continue to find resources without you needing to do anything; your application teams do not need to take any action in order to onboard their products and services into Kosli.
35+
36+
## Finding resources
37+
38+
Kosli Capture finds all supported resources within your AWS accounts, and determines which Kosli environment should hold the snapshots. Kosli Capture will create physical environments for you.
39+
40+
Kosli Capture can [filter out resources based on AWS tags](/administration/kosli_capture/getting_started#excluding-resources).
41+
42+
As your cloud environment evolves, such as the addition of new ECS clusters or the retirement of existing Lambdas, Kosli Capture automatically detects the changes. Because Kosli Capture creates physical environments as needed, when your infrastructure changes, Kosli will keep up. No changes to the configuration created during the initial setup are required.
43+
44+
## Multiple AWS accounts
45+
46+
Kosli Capture can operate across multiple AWS regions and accounts, allowing you to snapshot development, QA, pre-production, and production workloads with the same process.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Kosli Capture - Security
3+
sidebarTitle: Security
4+
description: "Learn about the security of Kosli Capture"
5+
tag: "BETA"
6+
---
7+
8+
<Warning>
9+
Kosli Capture is still in active development. Its capabilities and configuration format may change, and onboarding is done together with Kosli's Customer Success team.
10+
</Warning>
11+
12+
## Kosli Capture permissions
13+
14+
The Kosli Capture managed service uses the public AWS APIs to extract information about your cloud environments. In order to do this, you need to provide Kosli with an IAM role that allows access to these APIs. The role is created and owned by you. Kosli publishes a CloudFormation template, for use in AWS, showing the permissions needed. The template is publicly accessible and can be used directly within an `aws cloudformation create-stack` call.
15+
16+
The CloudFormation template we share with you includes a "phone-home" feature that notifies Kosli when a CloudFormation stack has been built from it; this allows us to pick up the AWS AccountId for the account in which you have used the CloudFormation template without you needing to do anything. This automation is especially useful when you deploy the template as a StackSet within an Organizational Unit.
17+
18+
### Assume role
19+
20+
The IAM role defined within the CloudFormation template includes an "assume role" policy granting permission from Kosli. This appears as:
21+
22+
```yaml
23+
KosliCaptureAccessRole:
24+
Type: AWS::IAM::Role
25+
Properties:
26+
RoleName: !Ref RoleName
27+
Description: >-
28+
Read-only access for Kosli Capture SDLC compliance evidence collection.
29+
Managed by CloudFormation; do not edit in place.
30+
MaxSessionDuration: 3600
31+
AssumeRolePolicyDocument:
32+
Version: "2012-10-17"
33+
Statement:
34+
- Sid: AllowKosliToAssumeWithExternalId
35+
Effect: Allow
36+
Principal:
37+
AWS: !Ref TrustedPrincipalArn
38+
Action: sts:AssumeRole
39+
Condition:
40+
StringEquals:
41+
sts:ExternalId: !Ref ExternalId
42+
```
43+
44+
### All permissions needed
45+
46+
The IAM role defined within the Cloudformation template includes a number of IAM policy statements, granting read-only access to some AWS APIs. The statements are:
47+
48+
```yaml
49+
Statement:
50+
51+
# How Capture finds what to snapshot. Discovery lists the ECS
52+
# clusters in the account and reads each cluster's tags from the
53+
# same DescribeClusters call.
54+
#
55+
# Worth knowing for a security review: these are inventory calls
56+
# and none of them returns application data. DescribeTaskDefinition
57+
# is the widest - a task definition holds the container image, the
58+
# command, and any environment variables written into the
59+
# definition itself in plain text. Values injected from Secrets
60+
# Manager or Parameter Store are named there rather than resolved,
61+
# so what comes back is the reference and not the secret.
62+
- Sid: EcsInventory
63+
Effect: Allow
64+
Action:
65+
- ecs:DescribeCapacityProviders
66+
- ecs:DescribeClusters
67+
- ecs:DescribeContainerInstances
68+
- ecs:DescribeServices
69+
- ecs:DescribeTaskDefinition
70+
- ecs:DescribeTasks
71+
- ecs:ListClusters
72+
- ecs:ListContainerInstances
73+
- ecs:ListServices
74+
- ecs:ListTagsForResource
75+
- ecs:ListTaskDefinitionFamilies
76+
- ecs:ListTaskDefinitions
77+
- ecs:ListTasks
78+
Resource: "*"
79+
80+
- Sid: LambdaInventory
81+
Effect: Allow
82+
Action:
83+
- lambda:GetFunctionConfiguration
84+
- lambda:GetPolicy
85+
- lambda:ListAliases
86+
- lambda:ListFunctions
87+
- lambda:ListTags
88+
- lambda:ListVersionsByFunction
89+
Resource: "*"
90+
91+
# lambda:GetFunction returns a pre-signed URL to the deployment
92+
# package. That is source-code access, so it is denied outright.
93+
- Sid: NeverDownloadFunctionCode
94+
Effect: Deny
95+
Action:
96+
- lambda:GetFunction
97+
- lambda:GetLayerVersion
98+
Resource: "*"
99+
```
100+
101+
## How Kosli isolates customers
102+
103+
Kosli Capture runs as a shared, autoscaled service, but each job runs under a role that is scoped to
104+
one customer:
105+
106+
* A Kosli Capture worker picks up a job for your organization and assumes a Kosli-side role that
107+
exists only for your organization. Only that role is permitted to call AssumeRole into your
108+
account with your ExternalId. A Kosli Capture worker running for a different customer is unable
109+
to connect to your cloud account.
110+
* When the job finishes, those credentials are discarded. A worker holding credentials for your
111+
cloud account has no path to anyone else's account.
112+
* The ExternalId lives in Parameter Store and is readable only by the Kosli-side role for your
113+
organization. The shared task role cannot read any customer's ExternalId. Separation is enforced
114+
by IAM, not by application code.
115+
116+
The trust policy on the role in your account limits access to the AWS account in which Kosli
117+
Capture is running. The ExternalId acts as a shared secret between Kosli and you, so that only
118+
Kosli Capture is permitted to assume the role.
119+
120+
Kosli Capture itself does not hold any customer data. Snapshots taken by Kosli Capture are
121+
immediately sent to Kosli through the same ingest path as your existing pipelines.

‎administration/managing_environments/overview.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ terraform import kosli_environment.my_environment production
6464
The `type` in your Terraform configuration must exactly match the type of the existing environment in Kosli. A mismatch will cause import errors or misconfiguration.
6565
</Warning>
6666

67+
### Automatically creating physical environments
68+
69+
[Kosli Capture Managed Service](/administration/kosli_capture/overview) snapshots the supported resources it finds in your cloud accounts and creates physical environments as needed.
70+
6771
## Managing logical environments
6872

6973
Logical environments group physical environments into a combined view — useful for representing a full production tier across multiple runtimes.

‎config/navigation.json‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@
7373
"administration/managing_custom_attestation_types/overview"
7474
]
7575
},
76-
"administration/managing_tags"
76+
"administration/managing_tags",
77+
{
78+
"group": "Kosli Capture",
79+
"pages": [
80+
"administration/kosli_capture/overview",
81+
"administration/kosli_capture/getting_started",
82+
"administration/kosli_capture/security"
83+
]
84+
}
7785
]
7886
},
7987
{

‎getting_started/environments.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Currently, the following environment types are supported:
5555
- Azure Web Apps and Function Apps
5656
- Google Cloud Run (services and jobs)
5757

58-
You can report environment snapshots manually using the `kosli snapshot [...]` commands for testing. For production use, however, you would configure the reporting to happen automatically on regular intervals, e.g. via a cron job or scheduled CI job, or on certain events.
58+
You can report environment snapshots manually using the `kosli snapshot [...]` commands for testing. For production use, however, you would configure the reporting to happen automatically on regular intervals, e.g. via a cron job or scheduled CI job, or on certain events. Kosli can also report these snapshots for you, using the [Kosli Capture Managed Service](/administration/kosli_capture/overview).
5959

6060
You can follow one of the tutorials below to setup automatic snapshot reporting for your environment:
6161
- [Kubernetes environment reporting](/tutorials/report_k8s_envs)

0 commit comments

Comments
 (0)