Skip to content

Commit e5744e5

Browse files
authored
Merge pull request #29 from xebia/6.2-GitHub-Administration
6.1 Authentication and Security + 6.2 GitHub administration
2 parents a583e20 + 0447263 commit e5744e5

File tree

7 files changed

+101
-29
lines changed

7 files changed

+101
-29
lines changed

learn-pr/github/authenticate-authorize-user-identities-github/includes/5-team-synchronization.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,28 @@ Team sync is ideal for enterprises looking to streamline membership management w
1717

1818
> ⚠️ To use team sync, your IdP admin must enable **SAML SSO** and **SCIM**.
1919
20+
## Enterprise Managed Users and GitHub Enterprise Server
2021

21-
## Enterprise Managed Users
22+
Team synchronization is also available for organizations and enterprise accounts that use GitHub Enterprise Cloud or [GitHub Enterprise Server (GHE.com)](https://github.com/enterprise), which is the preferred solution in regions where it is available or required for compliance reasons.
2223

23-
If you're using **Enterprise Managed Users** in GitHub Enterprise Cloud, all members are provisioned through your IdP. Users don't self-manage GitHub accounts and can't access resources outside the enterprise.
24+
**Enterprise Managed Users (EMUs)** are a GitHub Enterprise Cloud feature that gives enterprises complete control over user identity and account lifecycle. With EMUs, GitHub accounts are fully managed by the enterprise’s identity provider (IdP). This means users do not sign up for GitHub manually—all user provisioning, access, and offboarding is automated through tools like Microsoft Entra ID or Okta.
2425

25-
With this model, you can:
26+
EMUs are ideal for organizations with strict compliance, audit, or user governance needs. They help ensure that:
2627

27-
- Manage organization/team membership directly through your IdP
28-
- Ensure GitHub users are enterprise-scoped and isolated
28+
* All accounts are owned by the enterprise
29+
* Access is automatically granted or removed based on IdP membership
30+
* No external collaboration happens unintentionally
2931

30-
For more, see [Getting started with GitHub Enterprise Cloud](https://docs.github.com/get-started/onboarding/getting-started-with-github-enterprise-cloud).
32+
When using EMUs:
3133

34+
* Managed users cannot push code to or fork repositories outside the enterprise
35+
* They can only interact with other users and resources inside the enterprise
3236

37+
You can manage EMU-based organization and team membership using groups in your IdP, and optionally integrate [team synchronization](#enable-team-synchronization) to automate group-to-team mapping.
38+
39+
For organizations with requirements around self-hosting or specific regional regulations, **GitHub Enterprise Server (GHE.com)** offers an on-premises solution that allows you to maintain full control of your GitHub environment.
40+
41+
For more details, see [Getting started with GitHub Enterprise Cloud](https://docs.github.com/get-started/onboarding/getting-started-with-github-enterprise-cloud) and [About GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@latest).
3342

3443
## Team Synchronization vs. SCIM for GHES
3544

learn-pr/github/github-introduction-administration/includes/3-how-github-authentication-works.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
In the previous unit, you learned about typical administration tasks at the team, organization, and enterprise level. In this unit, you'll deep dive into one of the most common administrative tasks performed by organization owners, which is setting up and controlling users' authentication to GitHub.
1+
In the previous unit, you learned about typical administration tasks at the team, organization, and enterprise level. In this unit, youll explore one of the most common administrative tasks performed by organization owners, which is setting up and controlling users' authentication to GitHub.
22

33
## GitHub's authentication options
44

55
There are several options for authenticating with GitHub:
66

77
### Username and password
88

9-
Administrators can allow users to continue using the default username and password authentication method, sometimes known as the "basic" HTTP authentication scheme. In recent years, basic authentication has proven to be too risky when dealing with highly sensitive information. We strongly recommend using one (or several) of the other options listed in this unit.
9+
Administrators can allow users to continue using the default username and password authentication method, sometimes known as the "basic" HTTP authentication scheme. **Note: GitHub no longer supports password authentication for Git operations or API usage.** We strongly recommend using one (or several) of the other options listed in this unit.
1010

1111
### Personal access tokens
1212

@@ -26,41 +26,54 @@ You can even use SSH keys with a repository owned by an organization that uses S
2626

2727
Deploy keys are another type of SSH key in GitHub that grants a user access to a single repository. GitHub attaches the public part of the key directly to the repository instead of a personal user account, and the private part of the key remains on the user's server. Deploy keys are read-only by default, but you can give them write access when adding them to a repository.
2828

29+
To configure fork settings:
30+
31+
1. Go to the repository’s **Settings**.
32+
1. In the left sidebar, under Security, click **Deploy keys**.
33+
1. Locate the **Add deploy key** option to create a new key.
34+
35+
:::image type="content" source="../media/deployment-keys.png" alt-text="Screenshot showing the Add deploy key on the Deploy keys option." border="false":::
36+
2937
## GitHub's added security options
3038

31-
GitHub also offers the following extra security options.
39+
GitHub provides a range of security options to help protect accounts and organizational resources.
3240

3341
### Two-factor authentication
3442

3543
:::image type="content" source="../media/2-factor-authentication.png" alt-text="Screenshot of the two-factor authentication screen.":::
3644

37-
Two-factor authentication (2FA), sometimes known as multifactor authentication (MFA), is an extra layer of security used when logging into websites or apps. With 2FA, users have to sign in with their username and password and provide another form of authentication that only they have access to.
45+
Two-factor authentication (2FA), sometimes known as multifactor authentication (MFA), adds an extra layer of protection to your GitHub account. With 2FA, users sign in with their username and password, and then provide a second form of authentication.
3846

39-
For GitHub, the second form of authentication is a code generated by an application on a user's mobile device or sent as a text message (SMS). After a user enables 2FA, GitHub generates an authentication code anytime someone attempts to sign into their GitHub account. Users can only sign into their account if they know their password and have access to the authentication code on their phone.
47+
GitHub supports several second-factor options:
48+
- Authenticator apps (like Microsoft Authenticator, Google Authenticator, or Authy) that generate time-based one-time codes.
49+
- Hardware security keys (such as YubiKey or Titan Security Key) that support FIDO2/WebAuthn.
50+
- Passkeys for passwordless, phishing-resistant authentication.
51+
- SMS-based codes, which are supported but considered less secure than other options and are not recommended as a primary method.
4052

41-
Organization owners can require organization members, outside collaborators, and billing managers to enable 2FA for their personal accounts. This action makes it harder for malicious actors to access an organization's repositories and settings.
53+
**2FA enforcement:**
4254

43-
Enterprise owners can also enforce certain security policies for all organizations owned by an enterprise account.
55+
- For organizations on GitHub Team and GitHub Enterprise Cloud, organization owners can require members, outside collaborators, and billing managers to enable 2FA for their personal accounts.
56+
- Enterprise Managed Users (EMUs) and GitHub Enterprise Server (GHE.com): Admins can require 2FA for enterprise-managed accounts only, but cannot enforce 2FA on users’ personal GitHub.com accounts.
4457

45-
### SAML SSO
58+
Enforcing 2FA helps protect organizations from unauthorized access and strengthens the security of repositories and sensitive data.
4659

47-
If you centrally manage your users' identities and applications with an IdP, you can configure SAML SSO to protect your organization's resources on GitHub.
48-
49-
This type of authentication gives organization and enterprise owners on GitHub a way to control and secure access to organization resources like repositories, issues, and pull requests. Organization owners can invite GitHub users to join the organization that uses SAML SSO, which allows those users to contribute to the organization and retain their existing identity and contributions on GitHub.
60+
### SAML SSO
5061

51-
When users access resources within an organization that uses SAML SSO, GitHub will redirect them to the organization's SAML IdP for authentication. After they successfully authenticate with their account on the IdP, the IdP redirects to GitHub to access the organization's resources.
62+
If you centrally manage your users' identities with an identity provider (IdP), you can configure SAML single sign-on (SSO) to protect your organization’s resources on GitHub. SAML SSO allows organization and enterprise owners to control and secure access to repositories, issues, pull requests, and more. When accessing resources, GitHub redirects users to authenticate with the organization’s IdP.
5263

53-
GitHub offers limited support for all identity providers that implement the SAML 2.0 standard with official support for several popular identity providers including:
64+
GitHub supports all identity providers that implement the SAML 2.0 standard, with official support for several popular providers, including:
5465

5566
- Active Directory Federation Services (AD FS).
5667
- Microsoft Entra ID.
5768
- Okta.
5869
- OneLogin.
5970
- PingOne.
6071

61-
### LDAP
72+
### LDAP (GitHub Enterprise Server)
73+
74+
LDAP (Lightweight Directory Access Protocol) is a widely used protocol for accessing and managing user directory information. On GitHub Enterprise Server, LDAP integration allows you to authenticate users against your existing company directory and manage repository access centrally.
6275

63-
Lightweight directory access protocol (LDAP) is a popular application protocol for accessing and maintaining directory information services. LDAP lets you authenticate GitHub Enterprise Server against your existing accounts and centrally manage repository access. It's one of the most common protocols used to integrate third-party software with large company user directories.
76+
GitHub Enterprise Server integrates with major LDAP services such as:
6477

6578
GitHub Enterprise Server integrates with popular LDAP services like:
6679

learn-pr/github/github-introduction-administration/includes/4-how-github-organization-permission-works.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,53 @@ In the previous unit, you explored the different ways that users can authenticat
77

88
## Repository permission levels
99

10-
You can customize access to a given repository by assigning permissions. There are five repository-level permissions:
10+
You can customize access to each repository by assigning specific permission levels. There are five standard repository-level permissions:
1111

1212
- **Read**: Recommended for non-code contributors who want to view or discuss your project. This level is good for anyone that needs to view the content within the repository but doesn't need to actually make contributions or changes.
1313
- **Triage**: Recommended for contributors who need to proactively manage issues and pull requests without write access. This level could be good for some project managers who manage tracking issues but don't make any changes.
1414
- **Write**: Recommended for contributors who actively push to your project. Write is the standard permission for most developers.
1515
- **Maintain**: Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
1616
- **Admin**: Recommended for people who need full access to the project, including sensitive and destructive actions like managing security or deleting a repository. These people are repository owners and administrators.
1717

18-
You can give organization members, outside collaborators, and teams different levels of access to repositories owned by an organization. Each permission level progressively increases access to a repository's content and settings. Choose the level that best fits each person or team's role in your project without giving more access to the project than necessary.
18+
You can assign different permission levels to organization members, outside collaborators, and teams for repositories owned by your organization. Each permission level increases access to the repositorys content and settings. Always choose the minimum level of access required for each person or team’s responsibilities.
1919

20-
After you create a repository with the correct permissions, you can make it a template so that anyone who has access to the repository can generate a new repository that has the same directory structure and files as your default branch. To make a template:
20+
Administrators can also create custom roles in GitHub Enterprise, extending one of these base roles with additional permissions as needed.
2121

22-
1. On GitHub.com, go to the main page of the repository.
23-
1. Under the repository name, select **Settings**. If you can't see the **Settings** tab, open the dropdown menu, and then select **Settings**.
22+
### What is repository forking?
2423

25-
:::image type="content" source="../media/repository-actions-settings.png" alt-text="Screenshot showing where to locate the settings button in your GitHub repository.":::
24+
Forking is a way to create a personal copy of someone else's repository under your own GitHub account. When you fork a repository, you get your own version that you can freely modify without affecting the original project. This process is a common workflow for contributing to open source or experimenting with changes safely.
2625

27-
1. Select **Template repository**.
26+
You can also keep your fork up to date by pulling in changes from the original repository, often called the “upstream” repo.
27+
28+
Here’s how to fork a repository:
29+
30+
1. On GitHub.com, navigate to the main page of the repository you want to fork.
31+
2. In the upper-right corner, select **Fork**.
32+
3. Choose an owner for the fork (your personal account or an organization).
33+
4. Optionally, rename the forked repository or include all branches.
34+
5. Select **Create fork**.
35+
36+
:::image type="content" source="../media/fork-repo-option.png" alt-text="Screenshot showing the fork button in the top-right corner of a GitHub repository." border="false":::
37+
38+
### Managing fork permissions (for admins)
39+
40+
For organization-owned repositories, administrators can control whether repositories can be forked:
41+
42+
- **Public repositories**: Forking is always allowed.
43+
- **Private repositories**: Forking can be disabled or restricted to organization members only.
44+
- **Internal repositories**: These can only be forked within the same enterprise account.
45+
46+
To configure fork settings:
47+
48+
1. Go to the Organization repository’s **Settings**.
49+
1. In the left sidebar, under Access, click **Member privileges**.
50+
1. Locate the **Repository forking** options and update them as needed.
51+
52+
:::image type="content" source="../media/fork-repo-manage.png" alt-text="Screenshot showing the fork permissions of a GitHub Organization." border="false":::
53+
54+
**Tip:** If you disable forking for a private repository, no one (including organization members) will be able to fork it.
55+
56+
To learn more, see the GitHub Docs article on [Fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
2857

2958
## Ways Users Receive Repository Access
3059

24.9 KB
Loading
12.7 KB
Loading
8.8 KB
Loading

learn-pr/github/maintain-secure-repository-github/includes/2-how-to-maintain-secure-repository.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Here, we discuss some of the essential security tools and techniques available to GitHub repository administrators.
22

33
>[!Note]
4-
> The following content doesn't cover the fundamentals of writing secure code, but rather important security considerations, tools, and features to use within a GitHub repository.
4+
> This content focuses on **important security considerations, tools, and features to use within a GitHub repository.
55
66
## The importance of a secure development strategy
77

@@ -51,6 +51,7 @@ From the Security tab, you can add features to your GitHub workflow to help avoi
5151
- **Dependabot alerts** that notify you when GitHub detects that your repository is using a vulnerable dependency or malware.
5252
- **Security advisories** that you can use to privately discuss, fix, and publish information about security vulnerabilities in your repository.
5353
- **Code scanning** that helps you find, triage, and fix vulnerabilities and errors in your code.
54+
- **Secret scanning** that detects tokens, credentials, and secrets committed to your repo and can block them before the push. **Push protection** is enabled by default on public repositories.
5455

5556
For more information, see [GitHub security features](https://docs.github.com/code-security/getting-started/github-security-features).
5657

@@ -116,6 +117,26 @@ You can use the workflows that protect the branch to:
116117
- Run automated tests to check for any behavior changes of the code;
117118
- And so on.
118119

120+
## Required reviewers in pull requests
121+
122+
You can improve repository security by requiring reviews before code is merged into important branches. Required reviewers help enforce quality, security, and accountability.
123+
124+
To configure required reviewers:
125+
126+
1. Navigate to the repository on GitHub.
127+
2. Under the repository name, click **Settings** > **Branches**.
128+
3. Next to the branch you want to protect, click **Add rule** or edit an existing rule.
129+
4. Select **Require pull request reviews before merging**.
130+
5. Optionally, check:
131+
- **Require review from Code Owners**
132+
- **Dismiss stale pull request approvals when new commits are pushed**
133+
- **Require approval from someone other than the last pusher**
134+
135+
Required reviews can’t be bypassed without admin permissions. They ensure that proposed changes are reviewed by another contributor or designated code owner before being merged.
136+
137+
For more details, see [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches).
138+
139+
119140
## Add a CODEOWNERS file
120141

121142
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 individual team members or entire teams as code owners to paths in your repository. These code owners are then required for pull-request reviews on any changes to files in a path for which they're configured.

0 commit comments

Comments
 (0)