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

sig#803: API Enhancement - Deletion of External Technical Users #809

Closed
Tracked by #803
jjeroch opened this issue Jun 25, 2024 · 4 comments · Fixed by #804
Closed
Tracked by #803

sig#803: API Enhancement - Deletion of External Technical Users #809

jjeroch opened this issue Jun 25, 2024 · 4 comments · Fixed by #804
Assignees
Labels
Sub-task A small piece of work that's part of a larger task.
Milestone

Comments

@jjeroch
Copy link
Contributor

jjeroch commented Jun 25, 2024

reference ticket: #593

Description:
Existing service account deletion functionality to be extended allowing the deletion of technical users that are flagged as external. The current endpoint DELETE /api/administration/serviceaccount/owncompany/serviceaccounts/{serviceAccountId} should be utilized for this purpose.

Acceptance Criteria:

  1. Extend the current deletion endpoint to check for the external flag on the technical user.
  2. Depending if the flag is "external" or "internal" a different delete process will get followed.
    2a. for "internal" the process stays as is
    2b. for "external" a now backend logic will get followed (process followed below with # 3 ff.)
  3. Run the external delete endpoint and wait for response
  4. Upon receiving the successful delete response, set the technical user inside the portal DB to "DELETED" and update "lastChanged" date as well as "last editor" (table.identities)
  5. API response: success

Non-Functional requirements
A. The system should log all deletion attempts, successful or otherwise.
B. Ensure that the audit function works for the API enhancement

API Changes:

  • No changes to the endpoint path or method.

Error Handling (should be already in place!):

  • If the technical user does not exist, return a 404 Not Found error.
  • If the 3rd party system is not able to delete the technical user return a 404 error
@jjeroch jjeroch added the Sub-task A small piece of work that's part of a larger task. label Jun 25, 2024
@jjeroch jjeroch added this to the Release 2.1.0 milestone Jun 25, 2024
Phil91 added a commit that referenced this issue Jun 28, 2024
Phil91 added a commit that referenced this issue Jul 2, 2024
@jjeroch jjeroch changed the title API Enhancement - Deletion of External Technical Users sig#803: API Enhancement - Deletion of External Technical Users Jul 19, 2024
Phil91 added a commit that referenced this issue Jul 26, 2024
Phil91 added a commit that referenced this issue Jul 26, 2024
@ntruchsess ntruchsess linked a pull request Aug 5, 2024 that will close this issue
8 tasks
@MaximilianHauer
Copy link

MaximilianHauer commented Aug 26, 2024

discussed to change status from INACTIVE to DELETED for technical users after the feedback was given by the dim.
Story to be enhanced to furthermore set the status directly to DELETED if the user is a synchronous technical user.

Phil91 added a commit that referenced this issue Aug 27, 2024
* adjust deletion for external technical user
* adjust state of deleted users

Refs: #949 #950 #809
@Phil91
Copy link
Member

Phil91 commented Aug 28, 2024

discussed to change status from INACTIVE to DELETED for technical users after the feedback was given by the dim. Story to be enhanced to furthermore set the status directly to DELETED if the user is a synchronous technical user.

@MaximilianHauer just came across one case we didn't specified and wanted to mention it here. if for some reason the creation process of an external technical user is still in progress we now would cancel this progress and set the status of the user to DELETED directly without setting it to DELETION_PENDING. You can see this in my documentation pr as well.

@MaximilianHauer
Copy link

if the creation process is still ongoing we would need to raise an error during the call of the delete api.
this ensures that we would not cancel an unfinished process and the endcustomer can delete the technical user only as soon as the whole chain is fullfilled.

Phil91 added a commit that referenced this issue Aug 29, 2024
* adjust deletion for external technical user
* adjust state of deleted users

Refs: #949 #950 #809
Phil91 added a commit that referenced this issue Aug 29, 2024
* adjust deletion for external technical user
* adjust state of deleted users
----------------
Refs: #949 #950 #809 #952
Reviewed-By: Martin Rohrmeier <martin.ra.rohrmeier@bmw.de>
@MaximilianHauer
Copy link

tested successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sub-task A small piece of work that's part of a larger task.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants