Replies: 3 comments 6 replies
-
Thanks for the write-up but why can't you just substitute the default |
Beta Was this translation helpful? Give feedback.
-
Hi Ivo, I think two approaches can solve this problem that don't require the significant changes you outlined:
However, this seems a bit brittle, and it is not ideal that the dataplane type is discernable from its address. |
Beta Was this translation helpful? Give feedback.
-
Solution 2 in my opinion is not a good solution because of the proxy URL issue. It also couples the token generation service with knowledge of the data plane and ripples throughout the codebase. The issue is your use case requires specialized data transfer metadata. |
Beta Was this translation helpful? Give feedback.
-
Feature Request
For DataPlane authentication currently a hardcoded TokenGenerationService is implemented (TokenGenerationServiceImpl).
For scenarios where several DataPlane components are hosted on different systems, there would be the need for custom and different TokenGenerationServices for each DataPlane.
So the feature request is to be able to provide custom TokenGenerationService instances for individual DataPlanes.
Which Areas Would Be Affected?
This mainly affects the transfer-data-plane extension (Depending on the implementation approach. See below.)
Why Is the Feature Desired?
Solution Proposal
Allow to inject TokenGenerationServices via Extansion and support using the DataPlane proxy URL for selection of the matching TokenGenerationServices for the corresponding DataPlane.
Implementation Proposals
Implementation 1 - Provide specialized DataPlane TokenGenerationService via Extention
Create a DataPlaneTokenGenerationService interface with the following method, that passes the DataPlane url
Wrap the current TokenGenerationServiceImpl in an instance of DataPlaneTokenGenerationService.
Expose the wrapped TokenGenerationServiceImpl as default provider for DataPlaneTokenGenerationService
Inject the DataPlaneTokenGenerationService instance into TransferDataPlaneCoreExtension
Pass the instance along to ConsumerPullTransferEndpointDataReferenceServiceImpl and use it in :createProxyReference
Custom TokenGenerationServices can be provided via extension and can be selected to match the given "dataPlaneUrl".
Implementation 2 - Enhance existing TokenGenerationService
This implementation is similar to the previous one, but does not add a new "DataPlaneTokenGenerationService" class, but alters the existing TokenGenerationService with a "generate" method that allows to select a specific TokenGenerationService.
Implementation 3 - Central Named Intances Registry
A more generic approach would be to enhance the current core service registry mechanism.
The current extension mechanism uses only one Instance per class. For the case of the TokenGenerationService, where we need multiple instances, we could add a central registry, where globally shared instances are not only selected by class, but also have a "name" under which they are registred.
So the new methods would look like:
These instances could also be addressed by the injection mechanism, by altering the "Inject" annotation with an instance name
Implementation 4 - Named TokenGenerationService Instances Registry via Extension
Similar to implementation 3, but not implemented as a core service, but as a TokenGenerationService registry implemented in the transfer-data-plane extension. Allows multiple extensions to add individual named TokenGenerationServices.
Implementation Comparison
Beta Was this translation helpful? Give feedback.
All reactions