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

bugfix mixlower and uppercase for param definitions #450

Merged
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions libraries/edc-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.1
### Added

## fixed
- Fix config-parameter definition to not mix uppercase and lowercase like (baseUrl -> base.url)

## 0.1.0
### Added
- Update edc-extension to edc version 0.7.0
Expand Down
14 changes: 8 additions & 6 deletions libraries/edc-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ The following table outlines the configuration settings for the `DTR Data Plane
## Compatibility

| dtr-edc Extension library version | Digital Twin Registry image version | EDC version |
|-------------------------------|-------------------------------------|-------------|
| `0.1.0` | `> 0.4.2` | `0.7.X` |
|-----------------------------------|-------------------------------------|-------------|
| `0.1.0` | `> 0.4.2` | `0.7.3` |
| `0.1.1` | `> 0.4.2` | `0.7.3` |


## Using the DTR-EDC Access Control Extension

Expand Down Expand Up @@ -82,15 +84,15 @@ tractusx-connector:
...
env:
EDC_GRANULAR_ACCESS_VERIFICATION_ERROR_ENDPOINT_PORT: 9054
EDC_GRANULAR_ACCESS_VERIFICATION_EDC_DATA_PLANE_BASEURL: http://local-edc-data-plane:9051/public/v2/
EDC_GRANULAR_ACCESS_VERIFICATION_EDC_DATA_PLANE_BASE_URL: http://local-edc-data-plane:9051
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_NAMES: default
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_DTR_DECISION_CACHE_DURATION_MINUTES: 1
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_DTR_ACCESS_VERIFICATION_ENDPOINT_URL: http://baseurl-dtr/v2/api/v3/submodel-descriptor/authorized
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_ASPECT_MODEL_URL_PATTERN: http:\/\/baseurl-submodelserver\/pcf\/.*
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_ENDPOINT_URL: http://baseurl-keycloak/iam/access-management/v1/tenants/00000000-0000-0000-0000-000000000000/openid-connect/token
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_SCOPE: aud:local-edc-dtr
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENTID: dtr_client
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENTSECRET_PATH: dtrsecret
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_SCOPE: openid
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENT_ID: dtr_client
EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENT_SECRET_PATH: dtrsecret
...
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class DtrDataPlaneAccessControlConfigExtension implements ServiceExtension {

@Setting( value = "Contains the base URL of the EDC data plane endpoint where the data plane requests are sent by the end users." )
public static final String EDC_DATA_PLANE_BASE_URL = "edc.granular.access.verification.edc.data.plane.baseUrl";
public static final String EDC_DATA_PLANE_BASE_URL = "edc.granular.access.verification.edc.data.plane.base.url";
@Setting( value = "Comma separated list of DTR configuration names used as keys for DTR clients." )
public static final String EDC_DTR_CONFIG_NAMES = "edc.granular.access.verification.dtr.names";
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ public boolean shouldAllowAccess(
}

private boolean callDtr( final RequestKey requestKey ) {
monitor.debug( "Check submodel-server access. DTR calling with requested URL: " + requestKey.requestedUrl() + " and BPN: " +requestKey.bpn() );
final Request dtrRequest = getDtrRequest( requestKey );
try ( Response response = httpClient.execute( dtrRequest ) ) {
return response.isSuccessful();
} catch ( final IOException exception ) {
monitor.debug( "Failed to execute DTR access with requested URL: " + requestKey.requestedUrl() + " and BPN: " +requestKey.bpn() );
monitor.severe( "Failed to execute DTR access verification request.", exception );
throw new AccessControlServiceException( exception );
}
Expand Down
Loading