Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document GitHub App Access Token lookup credential plugin #95

Closed
wants to merge 7 commits into from

Conversation

tvo318
Copy link
Member

@tvo318 tvo318 commented Mar 3, 2025

Added the GitHub App Install token procedure (AAP-39191) to the credential plugins section of the documentation.

See rendered version here: https://awx-plugins-core--95.org.readthedocs.build/en/95/credential-plugins/#ug-credentials-github-app-lookup

4. Create a target credential that looks up the lookup credential. To use your lookup in a private repo, use **Source Control** as your Credential type. Provide the following attributes to properly configure your target credential:

- **Username**: provide the username of ``x-access-token``
- **Password** (required): click the |key| button of the input field. You are prompted to set the input source to use to retrieve your secret information - this is the credential that you created in the previous step.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would appreciate a screenshot of this step. It would tie with the first part of the documentation and someone familiar with AAP can complete this by following the images with only having to read the text diagonally.

Copy link
Member Author

@tvo318 tvo318 Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do have a screen shot for this. Do you see it in the rendered version, @PabloHiro?

image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that one is rendered correctly. I was referring to what happens when you click the "key" button, that is a different view right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can add it if it helps.
image

@webknjaz webknjaz added the documentation Improvements or additions to documentation label Mar 4, 2025
@webknjaz webknjaz changed the title Add github app token lookup procedure to credential plugins documentation Document GitHub App Access Token lookup credential plugin Mar 4, 2025
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is being disregarded but here are a number of possible improvements I got so far, for history.


3. Click **Create Credential** to confirm and save the credential.

4. Create a target credential that looks up the lookup credential. To use your lookup in a private repo, use **Source Control** as your Credential type. Provide the following attributes to properly configure your target credential:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks up the lookup

Any way to rephrase this?

GitHub App Token Lookup
~~~~~~~~~~~~~~~~~~~~~~~

This plugin allows a GitHub app token to be used as a credential input source to pull secrets from GitHub App. AWX uses existing GitHub auth from organizations' GitHub repos. Refer to `Generating an installation access token for a GitHub App <https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app>`_ for more detail.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in other places, use full words instead of slang. This will make the linter pass: https://github.com/ansible/awx-plugins/actions/runs/13636241048/job/38116085927?pr=95#step:15:96.

1. Create a lookup credential that stores your secrets. See TBD for detail.
..(link available in separate PR that has this information).

2. When **GitHub App Installation Access Token lookup** is selected for **Credential Type**, provide the following attributes to properly configure your lookup:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. When **GitHub App Installation Access Token lookup** is selected for **Credential Type**, provide the following attributes to properly configure your lookup:
2. When :guilabel:`GitHub App Installation Access Token lookup` is selected for :guilabel:`Credential Type`, provide the following attributes to properly configure your lookup:

.. image:: _static/images/credentials-create-target-github-app-credential.png
:alt: Example of creating a target credential that uses source control

6. Click **Create Credential** to confirm and save the credential.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. Click **Create Credential** to confirm and save the credential.
6. Click :guilabel:`Create Credential` to confirm and save the credential.

- **Username**: provide the username of ``x-access-token``
- **Password** (required): click the |key| button of the input field. You are prompted to set the input source to use to retrieve your secret information - this is the credential that you created in the previous step.

5. Enter an optional description for the metadata requested and click **Finish**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Enter an optional description for the metadata requested and click **Finish**.
5. Enter an optional description for the metadata requested and click :guilabel:`Finish`.

.. image:: _static/images/project-create-git-github-app.png
:alt: Example of a project pointing to a private git repo

9. Click **Save** and the project sync automatically starts and the project Details displays the progress of the job.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
9. Click **Save** and the project sync automatically starts and the project Details displays the progress of the job.
9. Click :guilabel:`Save` and the project sync automatically starts and the project Details displays the progress of the job.

- **Name** (required): provide the name for your project
- **Organization** (required): select the name of the organization from the drop-down menu
- **Execution environment**: optionally select an execution environment, if applicable
- **Source control type** (required): If you are syncing with a private repo, select **Git** for your source control.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Source control type** (required): If you are syncing with a private repo, select **Git** for your source control.
- **Source control type** (required): If you are syncing with a private repo, select :guilabel:`Git` for your source control.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(meant to click another button)

@tvo318 tvo318 closed this Mar 5, 2025
@tvo318 tvo318 deleted the add-github-apps-docs branch March 7, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants