Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

add origin to cf roles #342

Merged
merged 3 commits into from
Dec 5, 2022
Merged

add origin to cf roles #342

merged 3 commits into from
Dec 5, 2022

Conversation

pirnz
Copy link

@pirnz pirnz commented Dec 1, 2022

Reason

In some cases, the same user exists in more than one identity provider. A common case could be a user existing in both the default SAP ID service and in an Identity Authentication service.

In those cases, cf set-org-role and cf set-space-role will not assign the user, as it doesn't know which user to choose from. The error it gives is:

Ambiguous user. User with username 'xxxxxxxx' exists in the following origins: sap.ids, xxxx, xxxx. Specify an origin to disambiguate.
FAILED

According to the cf set-org-role and cf set-space-role, you can use the option --origin <idp> to specify the idp of the user.

I added the same logic applied to the idp for the btp roles so that it only adds the option if they have set the property idp.

Thanks,
Pedro

dependabot bot and others added 3 commits November 23, 2022 10:30
Bumps [inquirer](https://github.com/magmax/python-inquirer) from 2.10.1 to 3.0.0.
- [Release notes](https://github.com/magmax/python-inquirer/releases)
- [Commits](magmax/python-inquirer@v2.10.1...v3.0.0)

---
updated-dependencies:
- dependency-name: inquirer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@pirnz pirnz changed the base branch from main to dev December 1, 2022 16:20
@lechnerc77 lechnerc77 requested review from rui1610 and lechnerc77 and removed request for rui1610 December 2, 2022 07:54
@lechnerc77 lechnerc77 added the enhancement New feature or request label Dec 5, 2022
@lechnerc77 lechnerc77 added this to the btpsa-v1.2.0 milestone Dec 5, 2022
@lechnerc77 lechnerc77 linked an issue Dec 5, 2022 that may be closed by this pull request
1 task
@lechnerc77 lechnerc77 merged commit e4212b9 into SAP-samples:dev Dec 5, 2022
@lechnerc77
Copy link
Member

@pirnz Thanks for your contributions and closing the gap. PR is merged into dev. will be part of next release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Support of custom IdPs in Role assignment
2 participants