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

Feat: add identity provider to DTR #361

Merged
merged 13 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
tom-rm-meyer-ISST marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package org.eclipse.tractusx.puris.backend.common.ddtr.logic;

import com.fasterxml.jackson.databind.JsonNode;
import jakarta.annotation.Nullable;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.eclipse.tractusx.puris.backend.common.ddtr.logic.util.DtrRequestBodyBuilder;
Expand All @@ -29,7 +30,6 @@
import org.eclipse.tractusx.puris.backend.masterdata.domain.model.Material;
import org.eclipse.tractusx.puris.backend.masterdata.domain.model.MaterialPartnerRelation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Service;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ public class DtrSecurityConfiguration {
* token url of the OAuth2 identity provider
**/
@Value("${puris.dtr.idp.tokenurl}")
String tokenUrl;
private String tokenUrl;
/**
* client id of the puris client with write access for DTR
**/
@Value("${puris.dtr.idp.puris-client.id}")
String purisClientId;
private String purisClientId;
/**
* client secret of the puris client with write access for DTR
**/
@Value("${puris.dtr.idp.puris-client.secret}")
String purisClientSecret;
private String purisClientSecret;
/**
* grant_type. Currently only client_credentials is supported
**/
tom-rm-meyer-ISST marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -64,10 +64,10 @@ public class DtrSecurityConfiguration {
* client id of the edc client with read access for DTR
**/
@Value("${puris.dtr.idp.edc-client.id}")
String edcClientId;
private String edcClientId;
/**
* vault alias for the client secret of the edc client with read access for DTR
**/
@Value("${puris.dtr.idp.edc-client.secret.alias}")
String edcClientSecretAlias;
private String edcClientSecretAlias;
}
1 change: 0 additions & 1 deletion local/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

docker compose down -v
docker compose -f docker-compose-infrastructure.yaml down -v
docker compose -f docker-compose-idp.yaml down -v
docker image rm local-vault
rm .env
rm ./vault/secrets -r
Expand Down
1 change: 0 additions & 1 deletion local/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
version: "3"
services:

puris-frontend-customer:

Check warning on line 24 in local/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.
image: puris-frontend:dev
container_name: customer-frontend
ports:
Expand Down Expand Up @@ -84,7 +84,6 @@
postgres-customer:
condition: service_healthy
healthcheck:
# as security is enabled by default and we don't provide a bearer accept auth issues
test: ["CMD-SHELL", "wget -q --spider http://dtr-customer:4243/actuator/health/readiness"]
interval: 4s
timeout: 3s
Expand Down Expand Up @@ -173,7 +172,7 @@
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine

puris-frontend-supplier:

Check warning on line 175 in local/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.
image: puris-frontend:dev
container_name: supplier-frontend
ports:
Expand Down Expand Up @@ -210,7 +209,7 @@
image: puris-backend:dev
container_name: supplier-backend
depends_on:
edc-supplier-control-plane:

Check warning on line 212 in local/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.
condition: service_started #service_healthy
postgres-supplier:
condition: service_healthy
Expand Down
Loading