Skip to content

ACA-6528 Role Team assignment support EDA assignments with name - #205

Open
rohitthakur2590 wants to merge 13 commits into
ansible:develfrom
rohitthakur2590:aca_6324_1_br
Open

ACA-6528 Role Team assignment support EDA assignments with name#205
rohitthakur2590 wants to merge 13 commits into
ansible:develfrom
rohitthakur2590:aca_6324_1_br

Conversation

@rohitthakur2590

@rohitthakur2590 rohitthakur2590 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

- What is being changed?

plugins/action/role_team_assignment.py: Added _FULL_TYPE_OVERRIDES dict and eda_projects endpoint key to _SERVICE_LOOKUP_PATH_MAP. Updated _get_expected_endpoint() to check full content type overrides before falling back to suffix-based lookup.
plugins/modules/role_team_assignment.py: Documented eda_projects as the correct type value for EDA project assignments, with explicit note that projects routes to Controller.
plugins/action/role_definition.py / related: Corrected valid EDA project permissions — eda.sync_project (not eda.use_project), eda.view_rulebook included.
plugins/action/user.py: Fixed $encrypted$ false-positive on password comparison; aligned update_secrets behavior with stable-2.6 semantics.
Integration tests (role_team_assignments_test, role_definitions_test) and molecule converge updated to cover EDA project lifecycle.

- Why is this change needed?
EDA projects (eda.project) and Controller projects (awx.project) both use the suffix project, causing the assignment module to resolve both to the same endpoint (/api/controller/v2/projects/). This means any attempt to assign a role scoped to an EDA project would silently target Controller instead, returning a wrong resource lookup or a 404.
This blocks the use case described in ACA-6206 / AAPRFE-2614: teams and users cannot be granted role-based access to EDA projects through ansible.platform collection CaC playbooks.

- How does this change address the issue?
The suffix-based endpoint resolution (project → projects) is now short-circuited by a full content type override map. When content_type is exactly eda.project, the module routes to eda_projects → /api/eda/v1/projects/ instead of falling through to projects → /api/controller/v2/projects/. Controller project assignments (awx.project) are unaffected and continue routing correctly.
The fix is covered by integration tests that create an EDA project, define a role scoped to eda.project, assign it using type: eda_projects, verify idempotency, and clean up — all against a live Gateway.

Assisted By: Claude Code Sonet 4.6

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test update
  • Refactoring (no functional changes)
  • Development environment change
  • Configuration change

Self-Review Checklist

  • I have performed a self-review of my code
  • I have added relevant comments to complex code sections
  • I have updated documentation where needed
  • I have considered the security impact of these changes
  • I have considered performance implications
  • I have thought about error handling and edge cases
  • I have tested the changes in my local environment
  • Existing playbook FQCNs are preserved (no renames without a redirect in meta/routing.yml)
  • Deprecated parameters include a deprecated: block in DOCUMENTATION with removal version

Testing Instructions

Prerequisites

Steps to Test

Expected Results

Additional Context

Required Actions

  • Requires documentation updates
  • Requires downstream repository changes
  • Requires infrastructure/deployment changes
  • Requires coordination with other teams
  • Blocked by PR/MR: #XXX

CasC Notification

  • Not applicable — this change does not affect the CasC-monitored surface
  • CasC Jira ticket created:
  • CasC team tagged in this PR
  • Migration guide provided (required for breaking changes)

Screenshots/Logs

@rohitthakur2590 rohitthakur2590 added the safe to test PR is safe to run integration tests label Jun 17, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

Signed-off-by: Rohit Thakur <rothakur1210@gmail.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

Comment thread plugins/action/role_team_assignment.py Outdated
Comment thread plugins/action/role_team_assignment.py Outdated
@github-actions

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

DVCS PR Check Results:

Could not find JIRA key(s) in PR title, branch name, or commit messages

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

CasC Notification

This PR touches areas that may affect the CasC collections (e.g. infra.aap_configuration).

Detected changes in CasC-monitored areas:

  • Module changes: plugins/modules/role_team_assignment.py plugins/modules/user.py
  • Action plugin changes: plugins/action/base_action.py plugins/action/role_definition.py plugins/action/role_team_assignment.py plugins/action/user.py
  • plugin_utils changes (may affect return structure or auth): plugins/plugin_utils/api/v1/role_team_assignment.py plugins/plugin_utils/platform/direct_client.py

Please tag the CasC collections team in this PR so they are aware of the change.

This comment is posted automatically and does not block merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test PR is safe to run integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants