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

feat: add Authorization header to BDRS request #1206

Conversation

paullatzelsperger
Copy link
Contributor

WHAT

adds a VerifiablePresentation containing the MembershipCredential to the Authorization header of a BDRS request.
Specifically, assuming we're using JWT-VPs, this will add a header:

"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6I...."

In order to do that, the BdrsClient requires access to the SecureTokenService to create a self-issued ID token.
That SI token is then used to execute a PresentationQuery request to CredentialService, we "IATP ourselves".

The CredentialService's URL is resolved via a config parameter, and as a fallback, is resolved from the DID document.

WHY

Securing the directory API of the BDRS server.

FURTHER NOTES

A similar PR will come for the BDRS Server, to verify the auth header.

Closes # <-- insert Issue number if one exists

@paullatzelsperger paullatzelsperger added the enhancement New feature or request label Apr 9, 2024
@paullatzelsperger
Copy link
Contributor Author

@evegufy just added you as an FYI

@paullatzelsperger paullatzelsperger requested review from evegufy and removed request for evegufy April 9, 2024 10:26
@paullatzelsperger paullatzelsperger force-pushed the feat/add_authorization_to_bdrs_request branch from 943486d to 03063e2 Compare April 9, 2024 10:27
@paullatzelsperger paullatzelsperger force-pushed the feat/add_authorization_to_bdrs_request branch from 03063e2 to 583ee55 Compare April 9, 2024 10:33
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@paullatzelsperger paullatzelsperger merged commit 9a808fc into eclipse-tractusx:main Apr 10, 2024
31 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/add_authorization_to_bdrs_request branch April 10, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants