Skip to content

Commit d962d6f

Browse files
Add article about centralized auth and SSO
1 parent 47270fc commit d962d6f

File tree

9 files changed

+85
-0
lines changed

9 files changed

+85
-0
lines changed
80.8 KB
Loading
114 KB
Loading
18.2 KB
Loading
38.5 KB
Loading
105 KB
Loading
50.4 KB
Loading
18.7 KB
Loading
55.8 KB
Loading
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Centralized authentication and SSO
2+
3+
Private Packagist can be configured to synchronize user access with your code hosting platform (GitHub, Bitbucket, or GitLab),
4+
which in turn support authentication mechanisms like Microsoft Entra ID (formerly Azure Active Directory), Okta, LDAP, SAML or
5+
OpenID Connect.
6+
7+
You can configure your Private Packagist organization to enforce OAuth authentication for all members with the chosen platform,
8+
which in turn then allows users to authenticate with your centralized company system. Private Packagist does not support a direct
9+
integration with these authentication mechanisms without the use of OAuth.
10+
11+
![Private Packagist authentication flow](/Resources/public/img/docs/articles/centralized-authentication-and-sso/diagram.png)
12+
13+
Private Packagist uses [synchronizations](../features/integration-github-bitbucket-gitlab.md) to keep track of which users have access to your repositories. Synchronizations automatically
14+
import team member metadata, organizational structure like teams, their permissions and your repositories from your GitHub organization,
15+
Bitbucket workspace, or GitLab group. Similarly entries are removed when they disappear on the code hosting platform,
16+
so user removal or permission revocation is propagated to Private Packagist through synchronization as well.
17+
18+
The synchronization process enables you to continue managing user accounts from your company’s main Identity Provider (IdP), while providing an already familiar authentication flow to your users. Private Packagist currently supports GitHub, GitLab and Bitbucket in these configurations.
19+
20+
It’s very easy to get started with this approach. We’ll walk you through the required steps below.
21+
22+
### 1 - Set up the integration
23+
24+
If you are using Private Packagist Cloud and the cloud version of GitHub at github.com, or Bitbucket at bitbucket.org or GitLab at gitlab.com,
25+
you can skip this step. Otherwise, the first step is making sure your users can log in using the OAuth authentication flow.
26+
27+
OAuth authentication with the cloud versions of the default code hosting platforms (github.com, bitbucket.org and gitlab.com) is
28+
preconfigured on Private Packagist Cloud, but not on Private Packagist Self-Hosted.
29+
30+
Go to Settings > Integrations and press the "Add Integration" button.
31+
32+
![Create an integration](/Resources/public/img/docs/articles/centralized-authentication-and-sso/configure-integration.png)
33+
34+
### 2 - Connect your account via OAuth
35+
36+
Go to your profile and find the Connected Accounts section. Click on the Connect button to go through the OAuth authentication
37+
flow, and associate your Private Packagist account with your GitHub, GitLab or Bitbucket account.
38+
39+
![Connect your account via OAuth](/Resources/public/img/docs/articles/centralized-authentication-and-sso/profile-connect.png)
40+
41+
### 3 - Set up the synchronization
42+
43+
Now we can continue to set up the synchronization. In your organization, go to Settings > Synchronizations and press the
44+
Add Synchronization button. Follow the steps to complete the configuration.
45+
46+
![Create synchronization](/Resources/public/img/docs/articles/centralized-authentication-and-sso/configure-synchronization.png)
47+
48+
Once the synchronization is set up, Private Packagist will retrieve your users and their permissions from the code hosting platform.
49+
Private Packagist now knows which users have access to your organization and which repositories and teams/groups they can access
50+
once they log in via OAuth. Only users who have logged into Private Packagist using OAuth will be considered active and count for billing purposes.
51+
52+
Whether or not you are using automatic user provisioning, Private Packagist will always manage the same users as those provisioned
53+
in your code hosting platform. If a user is removed, that same user will also be removed from Private Packagist.
54+
55+
If you want to control which of your users should be allowed to access Private Packagist at all, you can opt to deactivate
56+
users discovered by the synchronization by default. Then, only users that you activate manually will be able to log in.
57+
To enable this behavior, go to the Teams tab, and click on "View and manage all members of this organization" and check the box:
58+
59+
![Deactivate users discovered by sync](/Resources/public/img/docs/articles/centralized-authentication-and-sso/deactivate-sync-members.png)
60+
61+
### 4 - Enforce OAuth authentication
62+
Now we can enforce OAuth authentication for all users in the organization, to ensure that users must authenticate with your
63+
identity system configured on the code hosting platform in order to access Private Packagist and cannot use an alternative
64+
method to log into Private Packagist.
65+
66+
Go to Settings > Access and apply the changes. From now on, everyone - including yourself - will be required to
67+
authenticate via your configured integration.
68+
69+
![Enforce OAuth authentication](/Resources/public/img/docs/articles/centralized-authentication-and-sso/enforce-oauth.png)
70+
71+
### 5 - Share the organization-specific login link
72+
73+
If you set up your own integration in Step 1, the final step is sharing your organization-specific login link with your users.
74+
Look for the "Login link" button in Settings > Integrations page.
75+
76+
![Login link settings](/Resources/public/img/docs/articles/centralized-authentication-and-sso/login-link-settings.png)
77+
78+
This link presents the option to authenticate with your configured integration. Once the user clicks on the
79+
"Login with <integration name>" button, the authentication process is initiated and your users are redirected to your
80+
code-hosting platform to log in.
81+
82+
If you are using one of the default platforms on Private Packagist Cloud, there is no
83+
need for a custom login link.
84+
85+
![Login link example](/Resources/public/img/docs/articles/centralized-authentication-and-sso/login-link-example.png)

0 commit comments

Comments
 (0)