-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from bci-oss/feature/287-extend-dtr-apis-for-…
…access-management__01-define-service-interface feat: Extend DTR APIs for Access management - Add service interface
- Loading branch information
Showing
11 changed files
with
246 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,7 @@ The following people have contributed to this repository: | |
* Johannes Kristan, Bosch.IO GmbH, [email protected] | ||
* Simone Lindner, [email protected] | ||
* Aggarwal Sahil, Robert Bosch GmbH, [email protected] | ||
* Tunahan Cicek, Robert Bosch GmbH, [email protected] | ||
* Istvan Zoltan Nagy, Robert Bosch GmbH, [email protected] | ||
|
||
Please add yourself to this list, if you contribute to the content. |
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,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
See the NOTICE file(s) distributed with this work for additional | ||
information regarding copyright ownership. | ||
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. | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations | ||
under the License. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.eclipse.tractusx</groupId> | ||
<artifactId>digital-twin-registry</artifactId> | ||
<version>DEV-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<groupId>org.eclipse.tractusx.digital_twin_registry</groupId> | ||
<artifactId>digital-twin-registry-access-control-service-interface</artifactId> | ||
<name>Tractus-X Semantic Layer Digital Twin Registry Access Control Interface</name> | ||
<description>Module contains the Semantic Layer Digital Twin Registry Service's access control service interface</description> | ||
<packaging>jar</packaging> | ||
|
||
<organization> | ||
<name>${organization}</name> | ||
<url>${url}</url> | ||
</organization> | ||
|
||
<licenses> | ||
<license> | ||
<name>${licence_name}</name> | ||
<url>${licence_url}</url> | ||
<distribution>${licence_distribution}</distribution> | ||
<comments>${licence_comments}</comments> | ||
</license> | ||
</licenses> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.github.git-commit-id</groupId> | ||
<artifactId>git-commit-id-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
38 changes: 38 additions & 0 deletions
38
.../main/java/org/eclipse/tractusx/semantics/accesscontrol/api/AccessControlRuleService.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,38 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.semantics.accesscontrol.api; | ||
|
||
import java.util.Set; | ||
|
||
import org.eclipse.tractusx.semantics.accesscontrol.api.exception.DenyAccessException; | ||
import org.eclipse.tractusx.semantics.accesscontrol.api.model.AccessRule; | ||
import org.eclipse.tractusx.semantics.accesscontrol.api.model.ShellVisibilityCriteria; | ||
import org.eclipse.tractusx.semantics.accesscontrol.api.model.SpecificAssetId; | ||
|
||
public interface AccessControlRuleService { | ||
|
||
Set<SpecificAssetId> filterValidSpecificAssetIdsForLookup( Set<SpecificAssetId> specificAssetIds, String bpn ) throws DenyAccessException; | ||
|
||
ShellVisibilityCriteria fetchVisibilityCriteriaForShell( Set<SpecificAssetId> specificAssetIds, String bpn ) throws DenyAccessException; | ||
|
||
Set<AccessRule> fetchApplicableRulesForPartner( String bpn ) throws DenyAccessException; | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
.../java/org/eclipse/tractusx/semantics/accesscontrol/api/exception/DenyAccessException.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,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.semantics.accesscontrol.api.exception; | ||
|
||
public class DenyAccessException extends Exception { | ||
|
||
public DenyAccessException( String message ) { | ||
super( message ); | ||
} | ||
|
||
public DenyAccessException( String message, Throwable cause ) { | ||
super( message, cause ); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...face/src/main/java/org/eclipse/tractusx/semantics/accesscontrol/api/model/AccessRule.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,27 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.semantics.accesscontrol.api.model; | ||
|
||
import java.util.Set; | ||
|
||
public record AccessRule(Set<SpecificAssetId> requiredSpecificAssetIds, Set<String> visibleSemanticIds) { | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
.../java/org/eclipse/tractusx/semantics/accesscontrol/api/model/ShellVisibilityCriteria.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,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.semantics.accesscontrol.api.model; | ||
|
||
import java.util.Set; | ||
|
||
public record ShellVisibilityCriteria(Set<String> visibleSpecificAssetIdNames, Set<String> visibleSemanticIds) { | ||
} |
24 changes: 24 additions & 0 deletions
24
...src/main/java/org/eclipse/tractusx/semantics/accesscontrol/api/model/SpecificAssetId.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,24 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.semantics.accesscontrol.api.model; | ||
|
||
public record SpecificAssetId(String name, String value) { | ||
} |
Empty file.
Empty file.
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