Skip to content

Commit

Permalink
chore: pr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Feb 15, 2024
1 parent 30c8811 commit 92e9bae
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ jobs:
- uses: ./.github/actions/setup-java

- name: Run E2E tests
run: |
./gradlew compileJava compileTestJava
./gradlew test -DincludeTags="EndToEndTest" -PverboseTest=true
run: ./gradlew test -DincludeTags="EndToEndTest" -PverboseTest=true

postgres-tests:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions edc-extensions/iatp/tx-iatp-sts-dim/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ plugins {
}

dependencies {
implementation(libs.edc.spi.core)
implementation(libs.edc.spi.policyengine)
implementation(libs.edc.identity.trust.spi)
implementation(libs.edc.auth.oauth2.client)
implementation(project(":spi:core-spi"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
import org.eclipse.tractusx.edc.iam.iatp.sts.dim.oauth.DimOauth2Client;
import org.eclipse.tractusx.edc.iam.iatp.sts.dim.oauth.DimOauthClientImpl;

/**
* Extension that provides an implementation if {@link DimOauth2Client} using {@link Oauth2Client}
* and the {@link StsRemoteClientConfiguration} configuration for fetching an OAuth token
*/
@Extension(DimOauthClientExtension.NAME)
public class DimOauthClientExtension implements ServiceExtension {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
import static org.eclipse.edc.jwt.spi.JwtRegisteredClaimNames.SUBJECT;
import static org.eclipse.edc.spi.http.FallbackFactories.retryWhenStatusIsNotIn;

/**
* Implementation of {@link SecureTokenService} that talks with DIM wallet. It supports two APIs for fetching the
* SI Token:
* <ul>
* <li>grantAccess: request the SI token to DIM by providing the credential types required</li>
* <li>signToken: request the SI token to DIM by providing the extracted `access_token` from the received SI token</li>
* </ul>
*/
public class DimSecureTokenService implements SecureTokenService {

public static final MediaType TYPE_JSON = MediaType.parse("application/json");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@

package org.eclipse.tractusx.edc.iam.iatp.sts.dim;

import org.eclipse.edc.spi.security.Vault;

/**
* Configuration of the OAuth2 client
* Configuration of the OAuth2 client for the OAuth2 Client credentials flow
*
* @param tokenUrl The token endpoint
* @param clientId The identifier of the client
* @param clientSecretAlias The client secret alias to be used with the {@link Vault} for fetching the secret
*/
public record StsRemoteClientConfiguration(String tokenUrl, String clientId, String clientSecretAlias) {

Expand Down
1 change: 1 addition & 0 deletions edc-tests/e2e-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {
testCompileOnly(project(":edc-tests:runtime:runtime-memory"))
testCompileOnly(project(":edc-tests:runtime:iatp:runtime-memory-sts"))
testCompileOnly(project(":edc-tests:runtime:iatp:runtime-memory-iatp-ih"))
testCompileOnly(project(":edc-tests:runtime:iatp:runtime-memory-iatp-dim-ih"))
testCompileOnly(project(":edc-tests:runtime:runtime-memory-ssi"))
testCompileOnly(project(":edc-tests:runtime:runtime-postgresql"))

Expand Down

0 comments on commit 92e9bae

Please sign in to comment.