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

Deprovision fails with user lifecycle #495

Open
phavekes opened this issue Nov 30, 2024 · 3 comments
Open

Deprovision fails with user lifecycle #495

phavekes opened this issue Nov 30, 2024 · 3 comments

Comments

@phavekes
Copy link
Member

This issue is imported from pivotal - Originaly created at Aug 15, 2022 by Bart Geesink

Two issues are pressing:

  1. UserLifecycle does not support multiple error messages per pop. Having an array of error messages is not allowed. This can be easily fixed on the Openconext-user-lifecycle side. https://github.com/OpenConext/OpenConext-user-lifecycle/pull/62
  2. Stepup-MIddleware is moaning to loudly when an identity is not found. This now results in a FAILED response from StepUp. That's a bit to severe. When an identity is not using StepUp, it should simply respond with an OK with empty data.
@phavekes
Copy link
Member Author

I am trying to deprovision a non-existing user with user lifecycle. The info that is returned cannot be parsed by user-lifecycle, and is different from the other projects:

Middleware answer:
curl -u 'lifecycle:secret' -X DELETE "https://middleware.test2.surfconext.nl/deprovision/urn%3Acollab%3Aperson%3Aexample.com%3Astudent186577/dry-run"

{"name":"OpenConext Stepup","data":[],"message":["User identified by: urn:collab:person:example.com:student186577 was not found. Unable to provide deprovision data."],"status":"FAILED"}

Expected answer:
{"status":"OK","name":"OpenConext-teams-server","data":[]}

Lifecycle will fail in this case:
Catchable Fatal Error: Method OpenConext\UserLifecycle\Domain\ValueObject\Client\ErrorMessage::__toString() must return a string value

I think it is best if we give the same answer as the other apps. (Bart Geesink - Aug 15, 2022)

@phavekes
Copy link
Member Author

So:

  1. StepUp middleware is to strict, when a user did not use stepup, the app should simply return an empty array.
  2. There is an actual bug where the error message should be a string, not an array of strings. (Michiel Kodde - Aug 24, 2022)

@phavekes
Copy link
Member Author

Yes, that seems correct to me. (Bart Geesink - Aug 25, 2022)

@phavekes phavekes removed their assignment Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

1 participant