Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ jobs:
endpoint: https://localhost:8000
skip-tls-verify: true

- name: Fetch roxctl and run roxctl central whoami
- name: Install roxctl
uses: stackrox/roxctl-installer-action@v1

- name: Check the current user with roxctl
run: |
curl -k -u admin:${ROX_PASSWORD} https://localhost:8000/api/cli/download/roxctl-linux --output ./roxctl
chmod +x ./roxctl
echo $ROX_ENDPOINT
./roxctl central whoami
roxctl central whoami
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ permissions:
Before being able to exchange tokens, the ACS Central instance needs to be configured to allow exchanging tokens
originating from GitHub Action workflow runs.

At the current time, this only works via API, see the sample configuration below:
For more information on how to configure this, follow the [RHACS documentation](https://docs.openshift.com/acs/4.4/operating/manage-user-access/configure-short-lived-access.html).

Below is a sample configuration via API you can use:
```bash
curl \
https://<central-endpoint>/v1/auth/m2m \
Expand Down Expand Up @@ -97,11 +98,17 @@ After the central login step has succeeded, the following environment variables
For verifying everything works correctly, the example below can be used:

```yaml
- name: Central Login
- name: Login to Central
uses: stackrox/central-login@v1
with:
endpoint: https://<central-endpoint>:443

- name: Install roxctl from Central
uses: stackrox/roxctl-installer-action@v1
with:
central-endpoint: https://${{ env.ROX_ENDPOINT }}
central-token: ${{ env.ROX_API_TOKEN }}

- name: roxctl central whoami
run: |
roxctl central whoami
Expand Down