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

Implements authorization for ConnectedAasManager #307

Merged

Conversation

mdanish98
Copy link
Contributor

@mdanish98 mdanish98 commented Jun 4, 2024

The current implementation of ConnectedAasManager should be extended to enable authorized requests.

This PR implements authorized versions of below Connected components:

  • Implements authorization for ConnectedAasManager
  • Implements authorization for ConnectedAasRepository
  • Implements authorization for ConnectedAasService
  • Implements authorization for ConnectedSubmodelRepository
  • Implements authorization for ConnectedSubmodelService

Signed-off-by: Mohammad Ghazanfar Ali Danish ghazanfar.danish@iese.fraunhofer.de

- Implements authorization for ConnectedAasRepository
- Implements authorization for ConnectedAasService
- Implements authorization for ConnectedSubmodelRepository
- Implements authorization for ConnectedSubmodelService

Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
@mdanish98 mdanish98 marked this pull request as ready for review June 5, 2024 19:03
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
image: eclipsebasyx/keycloak:0.0.1
build:
context: ./../examples/keycloak
dockerfile_inline: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

External dockerfile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

import org.keycloak.provider.Spi;

@AutoService(Spi.class)
public class InitializerSpi implements Spi {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to CI, since it's a CI plugin (not example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

<plugins>
<plugin>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test to the release-mongodb (for the log sink)

@Test
@Override
public void whenPostSubmodelDescriptor_LocationIsReturned() throws ApiException, IOException {
// TODO: It uses normal GET unauthorized request, need to override and refactor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you implementing in the scope of the PR?

@Test
@Override
public void whenPostShellDescriptor_LocationIsReturned() throws ApiException, IOException {
// TODO: It uses normal GET unauthorized request, need to override and refactor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you implementing in the scope of the PR?

@Test
@Override
public void whenPostSubmodelDescriptor_LocationIsReturned() throws ApiException, IOException {
// TODO: It uses normal GET unauthorized request, need to override and refactor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you implementing in the scope of the PR?

<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-feature-authorization</artifactId>
<scope>test</scope>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using this pom as reference, but applies to all changed poms: did you run mvn dependency:analyze to see if all the added deps are used?

Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
Signed-off-by: Mohammad Ghazanfar Ali Danish <ghazanfar.danish@iese.fraunhofer.de>
@zhangzai123 zhangzai123 merged commit 6b290bc into eclipse-basyx:main Jun 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants