Coder Social home page Coder Social logo

Comments (3)

petkivim avatar petkivim commented on August 26, 2024

Hi @egobsv

Currently the REST Adapter Service does not support sending user defined (custom) HTTP headers - all the user defined HTTP header are dropped. Instead, X-Road's built-in REST implementation supports transferring user defined HTTP headers. The easiest alternative would be to drop the REST Adapter Service and use X-Road's built-in REST implementation instead. In case using the REST Adapter Service is required, it should be further developed to support transferring user defined HTTP headers. We're glad to receive a pull request implementing such a feature.

Best regards,
Petteri

from rest-adapter-service.

egobsv avatar egobsv commented on August 26, 2024

Hi Petteri,
Thanks for your quick response, I guess we are better off upgrading to the latest version of xroad and skipping de adapter altogether. I am still unclear on whether the adapter is causing the issue though. Does the Xroad protocol forward all request headers for every message? Something like OAUTH2 relies on having headers available to exchange tokens so I think it might be a very useful thing to have.

Thanks for your comments,

from rest-adapter-service.

petkivim avatar petkivim commented on August 26, 2024

Hi @egobsv

Upgrading to the latest X-Road version and using the X-Road's own REST protocol is the recommended way to go. The adapter is most likely the cause of the issue, because it does not forward any HTTP headers set by the client application, except the content type header. This means that the authentication related HTTP headers are dropped by the client side adapter service.

Here you can find more information about how HTTP headers are handled in the X-Road REST protocol. There are some filtered and specially handled HTTP headers, but otherwise HTTP headers are forwarded as-is. This applies to both request and response messages.

Best regards,
Petteri

from rest-adapter-service.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.