Git Product home page Git Product logo

Comments (3)

krausvo1 avatar krausvo1 commented on July 19, 2024

I've been debugging the problem and I've found that the mentioned request is already a POST request. However, the token is actually being sent in a query parameter, which is wrong.

I have tried sending the token in the body of the POST request instead, but it is ignored that way. However, I have found that the token is read from the iPlanetDirectoryPro cookie sent with the request. This cookie should always be included because it is set after the previous POST /authenticate request.

So I think the token can actually be omitted from the request altogether.

from wrenam.

pavelhoral avatar pavelhoral commented on July 19, 2024

I've been debugging the problem and I've found that the mentioned request is already a POST request.

The mentioned GET method was a mistake on my side... I have updated the original report.

I did not realize that the resource is explicitly checking only the URL as the content is application/json and no application/x-www-form-urlencoded (which obviously makes sense for JSON REST API 🙄).

I will have to look at the UI logic if we can simply drop the query parameter. There might be use-cases when the cookie is different from what the front-end want to check.

Or as an alternative we might add support for something like { "tokenId": "..." } as the request body. But that would require some additional research as well.

from wrenam.

pavelhoral avatar pavelhoral commented on July 19, 2024

I have searched through the openam-ui-ria code and it is true that the token is always exclusively read from the cookie value and then passed to other components. The only place where the token can be different is in the token validator that can have stale cookie value.

I understand why we might want to check consistency between the UI state (e.g. Signed in as information) and the currently active session. For example when user reauthenticates in a different window, that might break UI state in the previously active window.

I am fine with simply removing support for the "tokenId" query parameter in the UI. However we should do it in a way that keeps the code clean.

from wrenam.

Related Issues (20)

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.