Skip to content

Commit bbe31b3

Browse files
authored
Merge pull request #120 from packagist/conductor-token-auth
Condcutor: explain short-lived update tokens to access Private Packagist
2 parents 7021207 + 1ad2840 commit bbe31b3

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed
Binary file not shown.

docs/composer-authentication.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Running Composer commands against Private Packagist always requires authentication.
55

66
## Different types of tokens
7-
Three different types of authentication tokens can be used to access Private Packagist.
7+
Four different types of authentication tokens can be used to access Private Packagist.
88

99
### User access token
1010
Every user has their own token that they can access either on the profile page or on the overview page of their organizations.
@@ -24,6 +24,11 @@ Read-only tokens are only meant to be used with an existing composer.lock file.
2424
If you need to run `composer update`, then either use a token with update access or your personal access token.
2525
Please note that you will be charged for authentication tokens with update access as if they were user accounts.
2626

27+
### Conductor authentication tokens
28+
Conductor creates short-lived authentication tokens with update access for each CI run that gets scheduled. Similar to
29+
organization authentication tokens, access can be restricted to any set of packages which any of the organization's teams
30+
has access to which can be configured when enabling Conductor for your packages.
31+
2732
### Private Packagist vendor customer tokens
2833
Every Private Packagist for Vendors customer receives their own authentication token.
2934
The token can only be used to install packages from the matching customer URL.
@@ -37,6 +42,7 @@ There are currently three different prefixes:
3742
* `packagist_ort_`: Organization tokens with read-only access
3843
* `packagist_out_`: Organization tokens with update access
3944
* `packagist_uut_`: User tokens with update access
45+
* `packagist_cut_`: Conductor tokens with update access
4046

4147
This format doesn't apply to authentication tokens generated for Private Packagist for Vendors customers and older tokens that haven't been regenerated recently.
4248
These tokens only consist of the 60 hexadecimal character random part.

docs/conductor/getting-started.md

+5-13
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,13 @@ Create a new GitHub Actions workflow in `.github/workflows/conductor.yaml` of yo
3131
CONDUCTOR_GITHUB_ACTIONS_WORKFLOW
3232

3333
1. Adjust the PHP Version used in the "Install PHP" step
34-
2. Commit and push the workflow to your main branch of your package repository
34+
2. Commit and push the workflow to your main branch of your GitHub repository
3535

36-
Create a secret `CONDUCTOR_COMPOSER_AUTH` with the Composer authentication configuration [as described here](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#authentication-using-the-composer-auth-environment-variable) to access Private Packagist.
37-
We recommend to create a dedicated authentication token with update access. You can copy and paste the contents for the secret from the "Environment variable" tab in the Private Packagist UI while creating the token in "Settings" -> "Authentication Tokens". Remove the single quotes around the value.
38-
39-
![Create Authentication Token](/Resources/public/img/docs/conductor/authentication-token.png)
40-
41-
The contents of the variable should look like this:
42-
43-
```json
44-
{"http-basic": {"repo.packagist.com": {"username": "token", "password": "packagist_out_73a81c..." }}}
45-
```
46-
47-
Conductor needs to verify your CI setup before you can start receiving PRs.
36+
If your package requires access to your Private Packagist Composer repository then Conductor will automatically create
37+
[short-lived authentication tokens](../composer-authentication.md#conductor-authentication-tokens) to run Composer commands in your CI environment.
38+
Similar to organization authentication tokens, access can be restricted to any set of packages to which any of the organization's teams has access.
4839

40+
Once the workflow is added to your GitHub repository, Conductor needs to verify your CI setup before you can start receiving PRs.
4941
## Verify your CI setup
5042

5143
- Navigate to the "Conductor" tab in your Private Packagist organization.

0 commit comments

Comments
 (0)