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

Clarify error message when group doesn't exist while adding scope map #2710

Open
joostrijneveld opened this issue Apr 18, 2024 · 2 comments
Open
Labels
enhancement New feature or request kanidm (cli) CLI tooling uwu ✧・゚: *✧・゚♡*(ᵘʷᵘ)*♡・゚✧*:・゚✧

Comments

@joostrijneveld
Copy link
Contributor

joostrijneveld commented Apr 18, 2024

Is your feature request related to a problem? Please describe.

When following the instructions about creating an OAuth integration, I was directed to issue the follow command:

kanidm system oauth2 update-scope-map <name> <kanidm_group_name> [scopes]...
kanidm system oauth2 update-scope-map nextcloud nextcloud_admins admin

However, the group nextcloud_admins did not exist yet. I was presented with the following somewhat cryptic error message:

2024-04-18T12:33:30.065096Z ERROR kanidm_cli: Item not found:" NoMatchingEntries" "8267f859-f59e-4947-8cb7-372f382802c4"

Describe the solution you'd like

I'd much appreciate a descriptive error message that tells me the group nextcloud_admins did not exist.

Describe alternatives you've considered

None; I have no idea what the returned UID represents.

Additional context

None

@joostrijneveld joostrijneveld changed the title Clarify error message when group doesn't exist when adding scope-map Clarify error message when group doesn't exist while adding scope-map Apr 18, 2024
@joostrijneveld joostrijneveld changed the title Clarify error message when group doesn't exist while adding scope-map Clarify error message when group doesn't exist while adding scope map Apr 18, 2024
@yaleman yaleman added enhancement New feature or request uwu ✧・゚: *✧・゚♡*(ᵘʷᵘ)*♡・゚✧*:・゚✧ kanidm (cli) CLI tooling labels Apr 19, 2024
@Firstyear
Copy link
Member

Hmmmm i'm not 100% sure how'd we handle this one. NoMatchingEntries is telling you here "nothing meets the criteria you requested" in this case, the absence of a group.

The UUID it gives you is a key that looks up the operation in the logs so you can find things.

maybe we need a specific error translation in the oauth2 path given our ongoing work to make errors more specific? But that has it's own challenges ...

@yaleman
Copy link
Member

yaleman commented Apr 23, 2024

Another problem is that it doesn't tell you if it's the group or the OAuth2 client it can't find, either.

It does need a more human error either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kanidm (cli) CLI tooling uwu ✧・゚: *✧・゚♡*(ᵘʷᵘ)*♡・゚✧*:・゚✧
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants