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

Adding service account info to controller docs #2978

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

EMcWhinn
Copy link
Contributor

Document controller changes needed for service accounts

https://issues.redhat.com/browse/AAP-36066

Affects `titles/controller-user-guide``

@EMcWhinn EMcWhinn added documentation Improvements or additions to documentation Controller Content applies to automation controller 2.5 Content applies to AAP 2.5 Needs backport to 2.5 Changes still need to be applied to the AAP 2.5 branch labels Feb 20, 2025
@EMcWhinn EMcWhinn requested a review from fosterseth February 20, 2025 10:29

* A service account created, if you are using *Client ID* and *Client secret*.
For more information see, link:https://docs.redhat.com/en/documentation/red_hat_hybrid_cloud_console/1-latest/html/creating_and_managing_service_accounts/proc-ciam-svc-acct-overview-creating-service-acct#proc-ciam-svc-acct-create-creating-service-acct[Creating a service account].

Copy link
Member

Choose a reason for hiding this comment

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

Somewhere here or in the linked section, we need to mention that in the Console, under User Access, they need to create an analytics admin group with all 3 of the options selected in order to work properly with AAP.

@tvo318
Copy link
Member

tvo318 commented Feb 25, 2025

Also, you might want to include a small section or add a troubleshooting section in the "Creating and Managing Service Accounts" to include the procedure for a project sync failure. The process involves doing a remediation, address any inventory inconsistencies, and check analytics logs.

@EMcWhinn EMcWhinn removed the request for review from fosterseth February 25, 2025 17:14
@fosterseth
Copy link
Member

fosterseth commented Feb 25, 2025

thanks for putting up this PR. We may want to highlight the set of permissions that a service account will need in order to be used correctly in AAP

These permissions are set up in console.redhat.com by an Org Admin

I believe the following AAP actions will require the these roles:
inventory syncing - Inventory Hosts viewer
project syncing - Remediations viewer
analytics shipping - Automation Analytics administrator

but we need to verify the above. We can either validate it by looking into Insights docs, or trial and error by adding and removing roles and seeing what passes/fails in AAP

@EMcWhinn
Copy link
Contributor Author

Thanks @tvo318 and @fosterseth for review.

I've added permissions info based on the information in the KB here:
https://docs.google.com/document/d/1A4Jm26leYrHPcKkbYmRKHdw2rs4XMZG1oNfBRe-jlSQ/edit?tab=t.0#heading=h.earuxdq0dhvu

Let me know if there is anything else we should add.

@tvo318 tvo318 requested a review from fosterseth February 27, 2025 15:27

* To use token-based authentication, you must create a Red Hat service account to generate a *Client ID* and *Client secret*.
* Assign this service account to the appropriate *User Access* group with necessary permissions.
* You must be an Organization Administrator when link:https://docs.redhat.com/en/documentation/red_hat_hybrid_cloud_console/1-latest/html/creating_and_managing_service_accounts/proc-ciam-svc-acct-overview-creating-service-acct#proc-ciam-svc-acct-create-creating-service-acct[Creating a service account].
Copy link
Member

@fosterseth fosterseth Feb 27, 2025

Choose a reason for hiding this comment

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

to clarify, you don't need to be an Org Admin to create a service account in console.redhat.com. However, only an Org Admin can add a service account to an RBAC group in console.redhat.com.

So if you aren't an org admin, you would create your service account, then ask your Org admin to add your account to the appropriate group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @fosterseth, regarding "...Insights project syncing with a service account credential, the remediations should be created with that same service account via the API"

Do you think we need to include this in the prerequisites or or within the procedure itself maybe? And do we need to include the curl commands to create a remediation with a service account? Thanks.

.Prerequisites

* A service account created.
For more information see, link:https://docs.redhat.com/en/documentation/red_hat_hybrid_cloud_console/1-latest/html/creating_and_managing_service_accounts/proc-ciam-svc-acct-overview-creating-service-acct#proc-ciam-svc-acct-create-creating-service-acct[Creating a service account].
Copy link
Member

Choose a reason for hiding this comment

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

we may want to mention that the service account used for Analytics needs to have Analytics Administrator viewer role in console.redhat.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.5 Content applies to AAP 2.5 Controller Content applies to automation controller documentation Improvements or additions to documentation Needs backport to 2.5 Changes still need to be applied to the AAP 2.5 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants