Skip to content
Discussion options

You must be logged in to vote

Hey Ivan,

how about this:

jwt_token := input.attributes.request.http.headers["x-amzn-oidc-data"]
jwt_token := input.attributes.request.http.headers.authorization

It's a complete rule jwt_token, and it'll either evaluate to the value of the one header, if present; or the other header, if present; or it'll be undefined.

You would run into trouble if both headers could be present, since complete rules may only evaluate to one value. If both were possible, you'd need to decide some precedence rule and encode that in your rule bodies, like

jwt_token := input.attributes.request.http.headers.authorization
jwt_token := input.attributes.request.http.headers["x-amzn-oidc-data"] if not input.attribu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ivan-radic
Comment options

@srenatus
Comment options

Answer selected by ivan-radic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants