You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/github/github-introduction-administration/includes/5-manage-organization-access-governance.md
+48-71Lines changed: 48 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ In the previous unit, you explored how repository and team permissions work in G
7
7
- Security and governance best practices
8
8
9
9
## Organization permission levels
10
+
10
11
GitHub organizations provide a centralized way for teams to collaborate on projects while maintaining controlled access to repositories and sensitive data. Organization permissions determine what members and teams can do within the organization, ensuring that each user has the appropriate level of access.
11
12
12
13
There are multiple levels of permissions at the organizational level:
@@ -50,99 +51,75 @@ To further streamline enterprise-scale access control:
50
51
-**Nested Teams:** Enterprise accounts can use nested team structures to reflect departmental hierarchies. A parent team’s permissions cascade down to child teams, simplifying complex access management.
51
52
-**Automation & Auditing:** You can use GitHub’s API or GitHub Actions to automate team creation and permission assignments, and audit access via organization or enterprise audit logs.
52
53
53
-
## 4.3.4 Difference Between Organization Members and Outside Collaborators
54
-
55
-
Understanding the distinction between an organization member and an outside collaborator is crucial for managing access and permissions effectively within GitHub. Here are the key differences:
56
-
57
-
-**Organization Member:**
58
-
- Included in the organization’s internal directory.
59
-
- Can be assigned to one or more teams with varying levels of repository access.
60
-
- May inherit organization-wide settings, such as SSO requirements or policies.
61
-
62
-
-**Outside Collaborator:**
63
-
- Not an official member of the organization.
64
-
- Has explicit access to specific repositories only.
65
-
- Does not appear in the organization’s internal member list.
66
-
- Lacks broader visibility into private repositories and organization settings.
67
-
68
-
## 4.3.5 Downsides of a User’s Membership in an Instance or Organization
69
-
70
-
When a user becomes a member of a GitHub organization, several implications come into play that affect their access, visibility, and responsibilities within the organization. These consequences are important to understand for effective management and collaboration.
71
-
72
-
-**Access to Private Repositories:** Organization members can view, clone, and contribute to private repos if granted the necessary permissions.
73
-
-**Visibility:** Members appear in the organization’s people directory, which may affect discoverability.
74
-
-**Policy Enforcement:** Security and compliance rules (e.g., SAML SSO, 2FA) apply to all organization members.
75
-
-**Billing Implications:** Each member may count toward your organization’s license or billing plan.
76
-
-**Team Collaboration:** Members can be grouped into teams, streamlining repository permissions and communication.
77
-
78
-
## 4.3.6 Assigning Least Privilege to a User for Repository, Organization or Team
54
+
## Enterprise Permissions and Policies via Ruleset
79
55
80
-
Applying the Principle of Least Privilege ensures that users have only the permissions necessary to fulfill their roles:
56
+
This section covers how to manage enterprise permissions and policies through rulesets. We'll explore best practices for structuring organizations, setting default permissions, synchronizing teams via Active Directory (AD), automating multi-org scripting, and aligning policies with your company’s trust and control positions.
81
57
82
-
-**Repository Access:**
83
-
- Assign the Read permission to most contributors.
84
-
- Grant Write or Admin only if they need to commit code or manage settings.
58
+
### Weighing the pros and cons of deploying a single versus multiple organizations
85
59
86
-
-**Organization Access:**
87
-
- Start with Member and only elevate to Owner for those who need administrative control.
88
-
- Use Billing Manager for financial responsibilities without granting code access.
60
+
When structuring your enterprise, one of the key decisions is whether to use a single organization or multiple organizations. Each approach has unique benefits and trade-offs.
89
61
90
-
-**Team Access:**
91
-
- Team Maintainer can manage team membership and settings.
92
-
- Team Member is suitable for contributors who only need to participate in repository and team discussions.
62
+
#### Single Organization
93
63
94
-
## 4.3.7 Benefits and Drawbacks of Creating a New Organization
|**Simplified Management:** Centralized control of permissions and policies. |**Limited Flexibility:** One-size-fits-all policies might not suit all teams. |
67
+
|**Consistency:** Uniform application of rules and streamlined collaboration. |**Security Risks:** A single breach could impact the entire organization. |
68
+
|**Resource Sharing:** Easier asset sharing across teams. |**Scalability Issues:** Managing permissions can become complex as the organization grows. |
69
+
|**Cost Efficiency:** Reduced overhead in administrative tooling and licensing. ||
95
70
96
-
Creating a new organization within GitHub can help you manage projects, teams, and resources more effectively. Here are some benefits and drawbacks to consider:
97
-
### Benefits and drawbacks of creating a new organization
|**Clear Separation:**Keep projects, teams, and billing separate from other organizations. |**Administrative Overhead:**Managing multiple organizations can be more complex. |
102
-
|**Custom Policies:**Apply specific security or compliance policies for different projects. |**Billing Complexity:**Each organization may need separate billing. |
103
-
|**Scalability:**Avoid making a single organization too complex. |**Fragmented Collaboration:**Users might need to switch between organizations. |
|**Tailored Policies:**Customize permissions to fit the specific needs of each team. |**Increased Complexity:**More organizations mean more administrative overhead. |
76
+
|**Enhanced Isolation:**Limits the impact of a security breach to a single organization. |**Redundancy:**Potential duplication of settings and management efforts. |
77
+
|**Decentralized Administration:**Teams can manage their own policies and permissions. |**Inter-Org Collaboration:**May require extra tools or processes for cross-organization projects. |
104
78
105
-
Consider these points to decide if creating a new organization is the right choice for your needs.
79
+
### Setting default read versus default write across organizations
106
80
107
-
## Repository security and management
81
+
Deciding on the default permission level is critical to balancing security and collaboration within your enterprise.
108
82
109
-
You can oversee the security and management of your repositories in several ways.
|**Enhanced Security:** Minimizes the risk of unintended modifications. |**Improved Collaboration:** Empowers users to contribute and modify content directly. |
88
+
|**Control:** Easier to audit and monitor changes. |**Efficiency:** Reduces bottlenecks in content creation and updates. |
89
+
|**Best For:** Environments where the majority of users only need to view resources. |**Risks:** Increases the chance of accidental changes or misconfigurations if not carefully managed. |
112
90
113
-
To manage changes to content within your repository, you can create [branch protection rules](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) to enforce certain workflows for one or more branches. Protection rules that can be applied to a branch include:
91
+
**Recommendation:**
92
+
Use a default read permission model and grant write access selectively, ensuring adherence to the principle of least privilege.
114
93
115
-
- Require a pull request before merging.
116
-
- Require status checks to pass before merging.
117
-
- Require conversation resolution before merging.
118
-
- Require signed commits.
119
-
- Require linear history.
120
-
- Require merge queue.
121
-
- Require deployments to succeed before merging.
122
-
- Lock the branch by making it read-only.
123
-
- Restrict who can push to matching branches.
94
+
### Team synchronization through Active Directory (AD)
124
95
125
-
Additionally, you can set branch rules that apply to everyone, including administrators. For example, you can allow force pushes to matching branches and allow deletions from users who have push access.
96
+
Using Active Directory (AD) for team synchronization makes user management and access control easier and more efficient.
126
97
127
-
###Add a CODEOWNERS file
98
+
#### Why use AD sync?
128
99
129
-
By adding a [CODEOWNERS](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax) file to your repository, you can assign team members or entire teams as code owners who are responsible for code in the repository. When someone opens a pull request that modifies code that belongs to a code owner, the code owner is automatically requested as a reviewer.
100
+
-**Single source of truth:** Keeps user identities consistent across your organization.
101
+
-**Automated access management:** Streamlines onboarding, offboarding, and role updates.
102
+
-**Seamless role alignment:** Ensures AD groups match enterprise roles and permissions.
130
103
131
-
You can create the CODEOWNERS file in either the root of the repository or in the `docs` or `.github` folder.
104
+
#### Things to consider before implementing
132
105
133
-
### View traffic by using Insights
106
+
-**Role mapping:** Clearly define how AD groups align with your organization's roles.
107
+
-**Sync frequency:** Set a schedule that balances performance and security.
108
+
-**Compliance & auditing:** Log all changes to meet compliance requirements.
134
109
135
-
Anyone who has push access to a repository can [view its traffic](https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/viewing-traffic-to-a-repository). In the traffic graph, they can view full clones (not fetches), visitors from the past 14 days, referring sites, and popular content.
110
+
By planning ahead, you can ensure a smooth integration that keeps your organization secure and well-organized.
136
111
137
-
To access the traffic graph:
112
+
### Maintainability: scripting for multiple organizations and access rights
138
113
139
-
1. On GitHub.com, go to the main page of the repository.
140
-
1. Under your repository name, select **Insights**.
114
+
As your enterprise scales, automating the management of permissions across multiple organizations is essential for maintainability.
141
115
142
-
:::image type="content" source="../media/repository-navigation-insights-tab.png" alt-text="Screenshot showing where to locate the Insights button in GitHub.":::
116
+
#### Key Practices:
143
117
144
-
1. On the left, select **Traffic**.
118
+
Automating the management of permissions across multiple organizations is crucial for maintaining efficiency and security as your enterprise grows. This section provides key practices for scripting and automation to ensure consistent and scalable permission management. By following these practices, you can streamline administrative tasks, reduce manual errors, and maintain a secure and well-organized environment.
145
119
146
-
:::image type="content" source="../media/traffic-tab.png" alt-text="Screenshot showing the Traffic tab highlighted in GitHub.":::
120
+
-**Modularity:** Develop scripts in modular components to handle different organizations with minimal changes.
121
+
-**Reusability:** Create reusable functions or modules to perform common permission tasks.
122
+
-**Testing:** Thoroughly test scripts in a controlled environment before deployment.
123
+
-**Logging:** Implement detailed logging to track changes and facilitate troubleshooting.
124
+
-**Version Control:** Use version control systems (like Git) to manage script revisions and collaborate with team members.
147
125
148
-
1. Optionally, you can select **Clones** or **Views** to see the traffic graph for clones or views.
0 commit comments