Skip to content

Commit 3b7f76a

Browse files
committed
Conductor: explain short-lived update tokens to access Private Packagist
1 parent 7021207 commit 3b7f76a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

docs/composer-authentication.md

+6-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,10 @@ 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 has access to.
30+
2731
### Private Packagist vendor customer tokens
2832
Every Private Packagist for Vendors customer receives their own authentication token.
2933
The token can only be used to install packages from the matching customer URL.
@@ -37,6 +41,7 @@ There are currently three different prefixes:
3741
* `packagist_ort_`: Organization tokens with read-only access
3842
* `packagist_out_`: Organization tokens with update access
3943
* `packagist_uut_`: User tokens with update access
44+
* `packagist_cut_`: Conductor tokens with update access
4045

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

docs/conductor/getting-started.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ CONDUCTOR_GITHUB_ACTIONS_WORKFLOW
3333
1. Adjust the PHP Version used in the "Install PHP" step
3434
2. Commit and push the workflow to your main branch of your package 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.
36+
Conductor automatically creates [short-lived authentication tokens](../composer-authentication.md#conductor-authentication-tokens) to access Private Packagist.
37+
However, if you prefer to manually setup authentication then you can configure the `COMPOSER_AUTH` environment variable.
38+
Create a GitHub Actions 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
39+
and assign the secret value to the `COMPOSER_AUTH` environment variable like shown below.
40+
41+
```yaml
42+
- name: "Running Conductor"
43+
uses: packagist/conductor-github-action@v1
44+
env:
45+
COMPOSER_AUTH: ${{ secrets.CONDUCTOR_COMPOSER_AUTH }}
46+
```
47+
3748
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.
3849
3950
![Create Authentication Token](/Resources/public/img/docs/conductor/authentication-token.png)

0 commit comments

Comments
 (0)