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

docs: adjust delete technical user documentation #399

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ To delete an user, just open up the user details and click the "delete" button.

update technical user secret

### Delete Service Account
### Delete Technical User

Delete an existing service account
Only service accounts of the own company can get deleted.
Delete an existing technical user
Only technical users of the own company can get deleted.
Permission: "delete_tech_user_management"

As part of the deletion API, the following tasks get executed:

```mermaid
flowchart TD
A(API delete call) -->|Pass the service account id| B["`Receive service account
A(API delete call) -->|Pass the technical user id| B["`Receive technical user
for company`"]
B --> C{Service account exists is active and user has access}
C --> |true| D{"`Linked to active/pending connector`"}
C --> |false| E("Error 404 - serviceAccount {serviceAccountId} not found for company {companyId}")
B --> C{Check technical user}
C --> |existing & active| D{"`Linked to active/pending connector`"}
C --> |not existing| E("Error 404 - serviceAccount {serviceAccountId} does not exist")
C --> |technical user not active| P("Error 409 - technical user {serviceAccountId} is not status active")
C --> |technical user owned by other company| Q("Error 403 - Only provider or owner of the technical user are allowed to delete it")
D --> |false| F{"`Linked to active
offer subscription`"}
D --> |true| G("`Error 409 - Technical User is linked to an active connector. Change the link or deactivate the connector to delete the technical user.`")
Expand All @@ -48,7 +50,7 @@ Endpoint can be called via:

Validation:

- only owned or managed service account that are active can get deleted
- only owned or managed technical user that are active can get deleted
- the deletion is not possible if the user is linked to an `active` offer subscription or an connector in state `active` or `pending`

> **_NOTE:_** Technical user owner as well as provider (managed tech user owner) can run the delete endpoint.
Expand Down