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#789 - API Expansion for Technical User Information #976

Closed
3 tasks
MaximilianHauer opened this issue Sep 6, 2024 · 2 comments · Fixed by #997 or #1023
Closed
3 tasks

sig#789 - API Expansion for Technical User Information #976

MaximilianHauer opened this issue Sep 6, 2024 · 2 comments · Fixed by #997 or #1023
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@MaximilianHauer
Copy link

MaximilianHauer commented Sep 6, 2024

Description:

Expand the GET technical user information API to include the usertypeof technical user (internal/external).
As an API Developer, I need to enhance the GET technical user information API to include the technical user type and service endpoint so that this information can be programmatically retrieved and utilized in various systems.

Endpoint to be adjusted -> GET: api/administration/serviceaccount/owncompany/serviceaccounts

Add Parameter usertype should display internal or external

Endpoint to be adjusted -> GET: GET: api/administration/serviceaccount/owncompany/serviceaccounts/{GetServiceAccountId}

Add Parameter usertype should display internal or external
table in database: portal.dim_company_service_accounts
field: authentication_service_url
should be provided via the parameter authenticationServiceUrlin the api get call


Acceptance Criteria:

  • The API should return whether the technical user is internal or external.
  • The API should provide the service endpoint associated with the technical user.
  • The API changes must maintain backward compatibility with existing integrations.

Test Case 1: Retrieve technical user information - Internal user

  • Description: Verify that the API returns the correct technical user information for an internal user.
  • Steps:
    1. Make a GET request to the endpoint api/administration/serviceaccount/owncompany/serviceaccounts.
    2. Verify that the response includes the following fields:
      • usertype: "internal"
      • authenticationServiceUrl: valid URL
  • Expected Result: The API should return the technical user information with the correct "internal"usertype and a valid authenticationServiceUrl.

Test Case 2: Retrieve technical user information - External user

  • Description: Verify that the API returns the correct technical user information for an external user.
  • Steps:
    1. Make a GET request to the endpoint api/administration/serviceaccount/owncompany/serviceaccounts.
    2. Verify that the response includes the following fields:
      • usertype: "external"
      • authenticationServiceUrl: valid URL
  • Expected Result: The API should return the technical user information with the correct "external" usertype and a valid authenticationServiceUrl.

Test Case 3: Retrieve technical user information by ID - Internal user

  • Description: Verify that the API returns the correct technical user information for an internal user when queried by ID.
  • Steps:
    1. Make a GET request to the endpoint api/administration/serviceaccount/owncompany/serviceaccounts/{GetServiceAccountId}.
    2. Verify that the response includes the following fields:
      • usertype: "internal"
      • authenticationServiceUrl: valid URL
  • Expected Result: The API should return the technical user information with the correct "internal" usertype and a valid authenticationServiceUrl.

Test Case 4: Retrieve technical user information by ID - External user

  • Description: Verify that the API returns the correct technical user information for an external user when queried by ID.
  • Steps:
    1. Make a GET request to the endpoint api/administration/serviceaccount/owncompany/serviceaccounts/{GetServiceAccountId}.
    2. Verify that the response includes the following fields:
      • usertype: "external"
      • authenticationServiceUrl: valid URL
  • Expected Result: The API should return the technical user information with the correct "external" usertype and a valid authenticationServiceUrl.
@Phil91
Copy link
Member

Phil91 commented Sep 17, 2024

@MaximilianHauer as clarified in the daily

  • for the internal users we access a settings value with the configured url to the centralIdp. For external users we can take the database value

@AnuragNagpure fyi

@AnuragNagpure
Copy link
Contributor

Below PR for adding AuthServiceUrl in portal repository is mentioned below
eclipse-tractusx/portal#432

Phil91 added a commit to AnuragNagpure/portal-backend that referenced this issue Sep 19, 2024
Phil91 added a commit that referenced this issue Sep 19, 2024
…ser data added (#997)

Refs: #976
Co-authored-by: Phil Schneider <info@philschneider.de>
Reviewed-by: Phil Schneider <info@philschneider.de>
Phil91 pushed a commit to eclipse-tractusx/portal that referenced this issue Sep 19, 2024
Phil91 added a commit to AnuragNagpure/portal-backend that referenced this issue Sep 23, 2024
Phil91 added a commit that referenced this issue Sep 23, 2024
Refs: #976
Reviewed-by: Phil Schneider <info@philschneider.de>
Co-authored-by: Phil Schneider <info@philschneider.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment