-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add authorization to all endpoints #786
Comments
Two issues for discussionIssue 1:Called from our DataplaneFIRST APPROACH: These paths could be secured via network settings -> only access allowed within the cluster:
SECOND APPROACH: Alternatively, we could use the possibility of the EDC: EDC HTTP Data Plane. This has never been tested and involves several processes, e.g., IRS data asset registration, Trace-X data ingest, GitHub Action Pipeline for setup of environments. Due to the high impact and complexity, the first approach (securing via network settings) is the preferred and more straightforward solution. Issue 2:Used by IRS to Send Job Completed Info
Currently, in IRS, there is no mechanism for authentication. It would be easy to work with a key within the Derived ticket for IRS for evaluation: eclipse-tractusx/item-relationship-service#740 Info from EDC team regarding usage of api key: https://matrix.to/#/!mYxOilDPMLCQhMoIVc:matrix.eclipse.org/$cCww_Sp9NEocHYou8rzvPFcxaBtFLEc-BHLr7ULH-DE?via=matrix.eclipse.org&via=matrix.org&via=dev-null.rocks The api key solution is also involved in several process and therefore still the more effort solution. |
Issue 1:OPTION: Using API Keys instead of OAuth 2. |
Target solution is to secure the endpoints via OAuth2 or API Key. We create a ticket for the target solution. |
As discussed the following was defined: Issue 1: We will use approach one and secure the apis to be only accessible within the kubernetes cluster. Issue 2: IRS will evaluate an approach of how they can accept a authentication parameter. So that trace-x can use it to secure the api.. |
Added some documentation here: Added known known here: |
Tested on E2E: Cannot access endpoints through Insomnia. I get a 404 for all of them. However, internal requests are failing as well. Sending notifications does not work currently and in the logs an identical error is mentioned: 2024-07-03T08:26:16.066Z WARN 1 --- [nio-8080-exec-7] o.e.t.t.c.config.TrustedEndpointsFilter : /api/internal/qualitynotifications/receive |
Hi @ds-crehm as discussed the public api should return 404 on the internal apis. I have fixed the behaviour that the notification callback apis used the wrong url. Now it should work please validate. |
Tested on dev/test & E2E: Notifications can be sent again now. Endpoints are properly secured. |
LGFM PO acceptance in behalf of @jzbmw |
As a Trace-X admin, (ROLE_ADMIN)
I want to have all my endpoints secured via a Trace-X role,
so that my application is secured against unwanted access.
Blocker
We do not have a technical user on INT environments. Therefore, we need a concept how to authenticate (e.g. API key?)
Hints / Details
for example, is not secured with any role. This could be resolved with adding:
@PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')")
All endpoints of
traceability-foss/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/application/rest/SubmodelController.java
Line 50 in c746f1d
Acceptance Criteria
Out of Scope
The text was updated successfully, but these errors were encountered: