-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: extract data-plane-iam module from data-plane-core
- Loading branch information
Showing
24 changed files
with
207 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ane-core/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
org.eclipse.edc.connector.dataplane.framework.DataPlaneFrameworkExtension | ||
org.eclipse.edc.connector.dataplane.framework.DataPlaneDefaultServicesExtension | ||
org.eclipse.edc.connector.dataplane.framework.DataPlaneDefaultIamServicesExtension |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Contributors to the Eclipse Foundation - initial API and implementation | ||
* | ||
*/ | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
// api(project(":spi:common:core-spi")) | ||
// api(project(":spi:control-plane:control-plane-api-client-spi")) | ||
api(project(":spi:common:jwt-spi")) | ||
api(project(":spi:common:jwt-signer-spi")) | ||
api(project(":spi:common:token-spi")) | ||
api(project(":spi:data-plane:data-plane-spi")) | ||
// | ||
// implementation(project(":spi:common:token-spi")) | ||
// implementation(project(":core:common:lib:store-lib")) | ||
implementation(project(":core:common:token-core")) | ||
// implementation(project(":core:common:boot")) | ||
// implementation(project(":core:common:lib:util-lib")) | ||
// implementation(project(":core:data-plane:data-plane-util")) | ||
// implementation(project(":extensions:common:http")) | ||
// implementation(project(":core:common:lib:state-machine-lib")) | ||
// | ||
// implementation(libs.opentelemetry.instrumentation.annotations) | ||
// | ||
// testImplementation(project(":core:common:lib:query-lib")) | ||
testImplementation(project(":core:common:junit")) | ||
// testImplementation(libs.awaitility) | ||
// testImplementation(testFixtures(project(":spi:data-plane:data-plane-spi"))) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...lane-iam/src/main/java/org/eclipse/edc/connector/dataplane/iam/DataPlaneIamExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Contributors to the Eclipse Foundation - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.connector.dataplane.iam; | ||
|
||
import org.eclipse.edc.connector.dataplane.iam.service.DataPlaneAuthorizationServiceImpl; | ||
import org.eclipse.edc.connector.dataplane.spi.iam.DataPlaneAccessControlService; | ||
import org.eclipse.edc.connector.dataplane.spi.iam.DataPlaneAccessTokenService; | ||
import org.eclipse.edc.connector.dataplane.spi.iam.DataPlaneAuthorizationService; | ||
import org.eclipse.edc.connector.dataplane.spi.iam.PublicEndpointGeneratorService; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Extension; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Inject; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Provider; | ||
import org.eclipse.edc.spi.system.ServiceExtension; | ||
import org.eclipse.edc.spi.system.ServiceExtensionContext; | ||
|
||
import java.time.Clock; | ||
|
||
@Extension(value = DataPlaneIamExtension.NAME) | ||
public class DataPlaneIamExtension implements ServiceExtension { | ||
|
||
public static final String NAME = "Data Plane IAM"; | ||
|
||
@Inject | ||
private Clock clock; | ||
@Inject | ||
private DataPlaneAccessTokenService accessTokenService; | ||
@Inject | ||
private DataPlaneAccessControlService accessControlService; | ||
@Inject | ||
private PublicEndpointGeneratorService endpointGenerator; | ||
|
||
@Override | ||
public String name() { | ||
return NAME; | ||
} | ||
|
||
@Provider | ||
public DataPlaneAuthorizationService authorizationService(ServiceExtensionContext context) { | ||
return new DataPlaneAuthorizationServiceImpl(accessTokenService, endpointGenerator, accessControlService, context.getParticipantId(), clock); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...lane-iam/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
org.eclipse.edc.connector.dataplane.iam.DataPlaneIamExtension | ||
org.eclipse.edc.connector.dataplane.iam.DataPlaneIamDefaultServicesExtension |
Oops, something went wrong.