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

[Backport][ipa-4-6] Fix ipa user-add --radius=radiusserver #2558

Closed
wants to merge 4 commits into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Nov 13, 2018

This PR was opened automatically because PR #2530 was pushed to master and backport to ipa-4-6 is required.

The command "ipa user-add --radius-username" fails with
ipa: ERROR: attribute "ipatokenRadiusUserName" not allowed
because it does not add the objectclass ipatokenradiusproxyuser
that is required by the attribute ipatokenradiususername.

The issue happens with ipa user-add / stageuser-add / user-mod / stageuser-mod.

The fix adds the objectclass when needed in the pre_common_callback method
of baseuser_add and baseuser_mod (ensuring that user and stageuser commands
are fixed).

Fixes https://pagure.io/freeipa/issue/7569
Add a xmlrpc test for ipa user-add/user-mod --radius-username
The command were previously failing because the objectclass
ipatokenradiusproxyuser was not automatically added when the
attribute ipatokenRadiusUserName was added to the entry.

The test ensures that the command is now succeeding.

Related to https://pagure.io/freeipa/issue/7569
A non-admin user which has the "User Administrator" role cannot
add a user with ipa user-add --radius=<proxy> because the
call needs to read the radius proxy server entries.

The fix adds a System permission for reading radius proxy server
entries (all attributes except the ipatokenradiussecret). This
permission is added to the already existing privileges "User
Administrators" and "Stage User Administrators", so that the role
"User Administrator" can call ipa [stage]user-add|mod --radius=<proxy>

Fixes: https://pagure.io/freeipa/issue/7570
Add a new integration test for the following scenario:
- create a user with the "User Administrator" role
- as this user, create a user with a --radius=<radius_proxy_server>

This scenario was previously failing because ipa user-add --radius
requires read access to the radius server entries, and there was no
permission granting this access.

Related to https://pagure.io/freeipa/issue/7570
@tiran
Copy link
Member Author

tiran commented Nov 13, 2018

PR was ACKed automatically because this is backport of PR #2530. Wait for CI to finish before pushing. In case of questions or problems contact @flo-renaud who is author of the original PR.

@tiran tiran added ack Pull Request approved, can be merged pushed Pull Request has already been pushed labels Nov 13, 2018
@tiran
Copy link
Member Author

tiran commented Nov 13, 2018

ipa-4-6:

  • d5eabd5 ipa user-add: add optional objectclass for radius-username
  • d6043c7 tests: add xmlrpc test for ipa user-add --radius-username
  • 3f56ae4 radiusproxy: add permission for reading radius proxy servers
  • 97133bb ipatests: add integration test for "Read radius servers" perm

@tiran tiran closed this Nov 13, 2018
@tiran tiran deleted the backport_pr2530_ipa-4-6 branch March 29, 2019 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants