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: Enable mock TLS termination on calls to Hydra #302

Merged
merged 1 commit into from
Aug 5, 2020
Merged

feat: Enable mock TLS termination on calls to Hydra #302

merged 1 commit into from
Aug 5, 2020

Conversation

samkelleher
Copy link
Contributor

Impact: minor
Type: feature

Issue

Same change as in reactioncommerce/reaction-identity#35 and reactioncommerce/api-plugin-authentication#6

When Hydra is being a TLS termination, a https header is required otherwise it will reject calls.

Solution

This PR adds the header when the environment variable it set to request to Hydra. There are 2 functions. One to expand the auth token, the other to verify the OAuth2 client exists (in practice this client check isn't used by us since our client is created in advance).

Breaking changes

None, default behaviour remains the same.

Testing

Run against a Hydra instance that not running with --dangerous-force-http.

Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

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

👍

@kieckhafer kieckhafer merged commit 02a2fe1 into reactioncommerce:trunk Aug 5, 2020
@kieckhafer kieckhafer mentioned this pull request Aug 5, 2020
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.

2 participants