Skip to content

Commit 1a7592f

Browse files
committed
Update Import GitHub Organization guide
1 parent 616487e commit 1a7592f

File tree

6 files changed

+63
-34
lines changed

6 files changed

+63
-34
lines changed
103 KB
Loading
112 KB
Loading
153 KB
Loading

docs/guides/github/import-github-organization/index.md

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,105 @@ title: Import GitHub Organization
33
sidebar_label: Import GitHub Organization
44
---
55

6-
CHANGES TODO
7-
86
# Import GitHub Organization
97

108
In this guide, you will:
119

12-
- This guide provides step-by-step instructions to import a GitHub organization into a Guardrails folder, ensuring that your GitHub environment is governed according to your organizational policies.
13-
14-
Turbot Guardrails enables seamless integration with GitHub, allowing you to manage your GitHub organizations and repositories effectively. By importing a GitHub organization into Guardrails, you gain the ability to:
10+
- Learn how to import an entire GitHub organization into Turbot Guardrails. This process allows Guardrails to discover and manage resources across your organization in real-time.
11+
- Monitor and troubleshoot the process.
1512

16-
- Centralize governance for your GitHub resources within Guardrails.
13+
<!-- - Centralize governance for your GitHub resources within Guardrails.
1714
- Apply policies to enforce security, compliance, and operational best practices.
1815
- Monitor real-time activity within your organization.
19-
- Establish detailed audit logs to track all activities and changes for improved visibility and reporting.
16+
- Establish detailed audit logs to track all activities and changes for improved visibility and reporting. -->
17+
18+
Importing a [GitHub Organization](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/about-organizations) into Guardrails involves these key steps:
19+
20+
- Configuring a GitHub with appropriate permissions at the Organization level.
21+
- Importing the Organization via the Guardrails Console.
2022

2123
## Prerequisites
2224

23-
- **Turbot/Operator** permissions at the Turbot resource level.
24-
- Familiarity with the Guardrails console.
25+
- Access to the Guardrails console with *Turbot/Owner* or *Turbot/Admin* permissions at the Turbot resource level.
26+
- GitHub mod should be installed in your Guardrails workspace.
2527
- Ensure access to [GitHub CLI](https://cli.github.com/) to fetch organization id.
26-
- Ensure GitHub organization has allowed access via personal access tokens. For more information [check here](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).
28+
- Ensure GitHub organization has allowed access via personal access tokens. See [Setting a personal access token policy for your organization](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization) for more information.
29+
30+
<!-- ## Supported Authentication -->
2731

28-
## Permissions required
32+
## What Permissions to Grant
2933

30-
To make sure all functionality of GitHub integration work, we suggest you to provide all the following permissions.
34+
<!-- To make sure all functionality of GitHub integration work, we suggest you to provide all the following permissions.
3135
3236
- Organization Administration - Read and write
3337
- Organization Blocking users - Read and write
3438
- Organization Webhooks - Read and write
3539
- Repository Administration - Read and write
36-
- Repository Metadata - Read-only
40+
- Repository Metadata - Read-only -->
41+
42+
To ensure full functionality of the GitHub integration, we recommend granting the following permissions:
3743

38-
## Step 1: Get GitHub Organization ID
44+
| **Permission** | **Access Level** | **Description** |
45+
|--------------------------------------|---------------------|-------------------------------------------------------------------------------------------------------|
46+
| Organization Administration | Read and write | Allows Guardrails to manage settings and configurations at the organization level. |
47+
| Organization Blocking Users | Read and write | Enables Guardrails to block and unblock users within the organization. |
48+
| Organization Webhooks | Read and write | Allows Guardrails to manage webhooks for capturing real-time events at the organization level. |
49+
| Repository Administration | Read and write | Grants Guardrails the ability to manage repository settings, including access controls and policies. |
50+
| Repository Metadata | Read-only | Provides Guardrails with visibility into repository metadata without modifying its content. |
3951

40-
Run the following command to get the id of the organization you want to import
52+
## Get GitHub Organization ID
53+
54+
There are various ways to get the GitHub organization ID
55+
56+
Use [GitHub CLI](https://docs.github.com/en/github-cli/github-cli/quickstart) and run the following command to get the id of the organization you want to import.
4157

4258
```
4359
gh api orgs/<organization name> --jq '.id'
4460
```
4561

46-
## Step 2: Login to Guardrails Console
62+
Alternatively, you can use `curl` command to render the ID
63+
64+
```
65+
curl -H "Authorization: Bearer ghp_iio5FzBF4OLbbes3AKasdre5f4mps50s7YXE" https://api.github.com/orgs/<your-org-name>
66+
```
67+
The result will be shown as below
68+
69+
```json
70+
{
71+
"login": "your-org-name",
72+
"id": 94844722,
73+
"node_id": "O_kgDOBac5MQ",
74+
"url": "https://api.github.com/orgs/your-org-name",
75+
....
76+
}
77+
```
78+
## Import Organization into Guardrails
4779

48-
Log in to the Guardrails console.
80+
Login to your Guardrails workspace console and select the **CONNECT** card.
4981

50-
![Guardrails Console Login](/images/docs/guardrails/guides/github/import-github-organization/guardrails-console-login.png)
82+
![Guardrails Console Login](/images/docs/guardrails/guides/github/import-github-organization/select-connect-card.png)
5183

52-
## Step 3: Navigate to Connect
84+
Select **GitHub** card from the connect panel.
5385

54-
## Step 4: Select parent resource
86+
![Connect GitHub Card](/images/docs/guardrails/guides/github/import-github-organization/connect-github-card.png)
5587

56-
Fill in the Parent Resource where you'd want your organization; typically this would be done at the `Turbot` root level of your hierarchy, however it can reside in a Folder instead.
88+
Choose the location where you want to import the organization. Typically this would be done at the `Turbot` root level of your hierarchy, however it can reside in a [Folder](/guardrails/docs/concepts/resources/hierarchy#folders) based on your use-case.
5789

58-
## Step 5: Fill in the organization details
90+
![Choose Location](/images/docs/guardrails/guides/github/import-github-organization/choose-location.png)
5991

60-
- Fill in the organization name used in `Step 1`.
61-
- Fill in the organization id fetched in `Step 1`.
62-
- Fill in the GitHub Personal Access Token
92+
Provide `Organization Name`, `Organization ID`, `Personal Access Token` and choose **Connect**
6393

64-
## Verify
94+
![Connect](/images/docs/guardrails/guides/github/import-github-organization/connect.png)
6595

66-
## Next Steps
96+
Verify that the controls are executed by navigating to **Controls** tab and select GitHub
6797

68-
Please see the following resources to learn more about Turbot Guardrails Enterprise:
98+
![Verify Controls](/images/docs/guardrails/guides/github/import-github-organization/verify-github-controls.png)
6999

70-
- Learn more about [TODO].
71-
- Learn about [TODO]
72100

73101
## Troubleshooting
74102

75-
| Issue | Description | Guide |
76-
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
77-
| Permission Issues | TO DO. | [Troubleshoot Permission Issues](/guardrails/docs/enterprise/FAQ/admin-permissions#aws-permissions-for-turbot-guardrails-administrators) |
78-
| Further Assistance | If you continue to encounter issues, please open a ticket with us and attach the relevant information to assist you more efficiently. | [Open Support Ticket](https://support.turbot.com) |
103+
| **Issue** | **Description** | **Guide** |
104+
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
105+
| Controls in Error | Controls may enter various states, including errors, which can impact their functionality. | [Learn More About Control States](/guardrails/docs/concepts/controls#control-state) |
106+
| Message: `Bad Credentials` | Guardrails GitHub controls may generate errors with a `Bad credentials` message, often caused by invalid or expired tokens. | [Token Expiration and Revocation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/token-expiration-and-revocation) |
107+
| Further Assistance | If issues persist, please open a ticket with us and attach relevant details for more efficient troubleshooting. | [Open Support Ticket](https://support.turbot.com) |
120 KB
Loading
118 KB
Loading

0 commit comments

Comments
 (0)