Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP IAM docs & tutorials #209

Merged
merged 29 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e59ad19
Add azure IAM code samples
amitlicht Mar 7, 2024
23e43c2
Read account & container name from env
amitlicht Mar 7, 2024
462e537
rename storage account
amitlicht Mar 7, 2024
6d0fea0
Prettify output
amitlicht Mar 7, 2024
08575df
Merge remote-tracking branch 'origin/main' into amitlicht/azure_iam_t…
amitlicht Mar 10, 2024
0d10327
Azure IAM tutorial - WIP
amitlicht Mar 10, 2024
a8c377f
Update reference
amitlicht Mar 10, 2024
6a2e9c9
Fixes
amitlicht Mar 10, 2024
4cd99ee
Add icons
amitlicht Mar 10, 2024
1cd9f27
Remove patch deployment
amitlicht Mar 10, 2024
5fcc229
Remove subscription ID & resource group from clientintents (auto-dete…
amitlicht Mar 10, 2024
3b6114d
Touchups
amitlicht Mar 10, 2024
450750f
Added new lines
tomergreenwald Mar 10, 2024
b40c1b5
let az cli figure out storage account SKU on its own
amitlicht Mar 10, 2024
856696e
Fix linebreak
amitlicht Mar 10, 2024
e2a76c0
Improving client app
amitlicht Mar 10, 2024
5249586
Improving client app
amitlicht Mar 10, 2024
ebf6619
More touchups
amitlicht Mar 10, 2024
0a2eed2
Document the label
amitlicht Mar 10, 2024
c60dd19
Update docs/features/azure-iam/tutorials/azure-iam-aks.mdx
amitlicht Mar 11, 2024
d541f94
Update docs/features/azure-iam/tutorials/azure-iam-aks.mdx
amitlicht Mar 11, 2024
4d59d80
Remove subscription & resource group from intents format
amitlicht Mar 11, 2024
0c08fc6
Fix the tutorial to work with custom storage accounts without modifyi…
amitlicht Mar 12, 2024
0c6485f
Merge branch 'amitlicht/azure_iam_tutorial' of github.com:otterize/do…
amitlicht Mar 12, 2024
fe9c05e
GCP IAM docs & tutorials
otterobert Mar 13, 2024
2bb3f38
fixups
orishoshan Mar 14, 2024
bea09a1
Merge branch 'main' of ssh://github.com/otterize/docs into david/gcp-…
orishoshan Mar 14, 2024
d6a598b
fixups
orishoshan Mar 14, 2024
92161d9
fixups
orishoshan Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/features/aws-iam/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:

| Key | Description | Default |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| `credentials-operator.otterize.com/create-aws-role` | By setting to **true** the credential operator will create an unique AWS Role for the associated pod | `false` |
| `credentials-operator.otterize.com/create-aws-role` | When set to **true**, the credential operator will create an unique AWS Role for the associated pod | `false` |


### Helm Chart options
Expand Down
6 changes: 0 additions & 6 deletions docs/features/azure-iam/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ export const tutorials = [

# Azure IAM

:::info
Azure IAM support is currently a part of our early access program.
Sign up to the [Early Access Beta Program](https://otterize.com/EarlyAccessBetaProgram) and we'll be in touch!
:::


Otterize can create just-in-time Azure IAM workload identities & role assignments for your workloads running on AKS Kubernetes clusters, greatly simplifying the lifecycle of managing Azure IAM identities and roles.

### Tutorials
Expand Down
2 changes: 1 addition & 1 deletion docs/features/azure-iam/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:

| Key | Description | Default |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| `credentials-operator.otterize.com/create-azure-workload-identity` | By setting to **true** the credential operator will create an Azure workload identity the associated pod | `false` |
| `credentials-operator.otterize.com/create-azure-workload-identity` | When set to **true**, the credential operator will create an Azure workload identity the associated pod | `false` |


### Helm Chart options
Expand Down
8 changes: 8 additions & 0 deletions docs/features/gcp-iam/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "GCP IAM",
"position": 2,
"collapsed": true,
"customProps": {
"image": "/img/icons/gcp.png"
}
}
64 changes: 64 additions & 0 deletions docs/features/gcp-iam/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
sidebar_position: 1
title: GCP IAM | Overview
hide_table_of_contents: true
hide_title: true
---

import DocsLinkCard from "@site/src/components/LinkCard";

export const tutorials = [
{
title: 'Automate GCP IAM for GKE',
description: 'Create just-in-time GCP IAM roles and policies that are kept in sync with your workloads',
url: '/features/gcp-iam/tutorials/gcp-iam-gke'
},
];


# GCP IAM

Otterize can create just-in-time GCP IAM workload identities & role assignments for your workloads running on GKE Kubernetes clusters, greatly simplifying the lifecycle of managing GCP IAM identities and roles.

### Tutorials

To learn how to use the Intents Operator and Credentials Operator to manage just-in-time GCP IAM access, check out the tutorial.
<DocsLinkCard items={tutorials} colSize={"sm"}/>


### How does Otterize work with GCP IAM?

1. First, the GKE cluster must have:
- Enabled [workload identity federation for GKE](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity)
- [Config Connector Installed](https://cloud.google.com/config-connector/docs/how-to/install-upgrade-uninstall)
- [Otterize installed](/overview/installation).
2. To have a role created for a pod, label the pod with `credentials-operator.otterize.com/create-gcp-sa: "true"`
3. The credentials operator will:
- Annotate the pod ServiceAccount and Namespace with the relevant workload identity and Otterize labels.
- Create a GCP ServiceAccount and bind it to the pod ServiceAccount.
4. At this point, the pod is connected to your GCP project through the newly created GCP ServiceAccount but does not have any permissions to perform any action. We will need to create a ClientIntents YAML for the access the service requires and apply it to our cluster. Below is an example of a ClientIntents file for accessing a GCS bucket. View the [reference](/features/gcp-iam/reference) to learn more about the GCP IAM ClientIntents syntax.
5. Once the intent is applied, the intents operator will create a new GCP IAM policy, which will be attached to the service’s role with the appropriate access.
6. Done!

```yaml
apiVersion: k8s.otterize.com/v1alpha3
kind: ClientIntents
metadata:
name: server
namespace: my-namespace
spec:
service:
name: server
calls:
- name: projects/_/buckets/otterize-demo-bucket*
type: gcp
gcpPermissions:
- "storage.admin"
```

### Automatically generating ClientIntents for GCP IAM

Figuring out which access you need for GCP can be a painful, trial and error process, and something you _must_ do if you're tightening production access.

Otterize is getting ready to release support for using existing traffic to generate least-privilege IAM policies. Keen to try this out as part of early access? Sign up to the [Early Access Beta Program](https://otterize.com/EarlyAccessBetaProgram) and we'll be in touch!

49 changes: 49 additions & 0 deletions docs/features/gcp-iam/reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
sidebar_position: 3
title: Reference
---

### ClientIntents example (YAML)

```yaml
apiVersion: k8s.otterize.com/v1alpha3
kind: ClientIntents
metadata:
name: server
spec:
service:
# The name of the pod that will be granted access
name: server
calls:
# The GCP resource name as defined in the linked documentation below
# Wildcards can be used in the end of the resource name to match multiple and nested resources
- name: projects/_/buckets/otterize-demo-bucket*
type: gcp
# one or more GCP Roles that will be provided to the specified resources
gcpPermissions:
- "storage.admin"
# Multiple call definitions can be defined for a single service.
- name: projects/_/buckets/otterize-read-only-bucket*
type: gcp
gcpPermissions:
- "storage.objectViewer"
```

### GCP documentation references
- For GCP resource names, refer to the [Resource Name Format](https://cloud.google.com/iam/docs/conditions-resource-attributes#resource-name) documentation.
- For GCP roles and permissions, refer to the [Predefined roles and permissions](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) documentation.

### Annotations

| Key | Description | Default |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| `credentials-operator.otterize.com/create-gcp-sa` | When set to **true**, the credential operator will create a unique GCP service account for the K8S ServiceAccount of the associated pod | `false` |


### Helm Chart options

| Key | Description | Default |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| `global.gcp.enabled` | Enable or disable GCP integration | `false` |

View the [Helm chart reference](/reference/configuration/otterize-chart) for all other options
5 changes: 5 additions & 0 deletions docs/features/gcp-iam/tutorials/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Tutorials",
"position": 2,
"collapsed": false
}
Loading
Loading