add support for http mw in v2 version #30
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Create a
v2
version as specified ingo.mod
asgithub.com/infobloxopen/atlas-authz-middleware/v2
Since this version is specific to HTTP middleware without any support for grpc interceptors, for any consumer, who is supposed to use both grpc interceptor and http middleware, need to download both the versions (
main
andv2
)The middleware will validate the incoming HTTP requests by forwarding the endpoint and jwt token to the OPA engine running in the sidecar.
For the opa client, it expects a jwt token in the
Authorization
header, prefixed withBearer
and an optionalX-Request-ID
header.Unauthorised requests will usually be rejected with a status of
401 Unauthorized