GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restore WebID-TLS login in OIDC mode by RubenVerborgh · Pull Request #650 · nodeSolidServer/node-solid-server

Conversation

@RubenVerborgh

@RubenVerborgh RubenVerborgh commented Apr 19, 2018

Copy link
Copy Markdown
Contributor

This is a kludge to make WebID-TLS login work again when the server is running in OIDC mode. The problem I observed is as follows:

  • When I would click the "Log in with WebID-TLS" button, the browser would send an AJAX POST request to /login/tls.
  • That POST request would trigger re-negotiation on the server and ask for a client certificate.
  • The server would extract my WebID from my client certificate (which is https://ruben.verborgh.org/profile/#me).
  • The server would:
    1. incorrectly assume that I want to be directed to my own pod instead of the redirect URI (see Send full returnToUrl to oidc-auth-manager #648);
    2. incorrectly assume that my home pod is https://ruben.verborgh.org/.
  • Hence, the server would send a 302 response redirecting to https://ruben.verborgh.org/.
  • Therefore, the browser (still executing the AJAX request) would redirect to https://ruben.verborgh.org/ (without letting the AJAX script know), but that would fail because the AJAX request uses credentials: 'include', which doesn't work there (nor should it).
  • Since the redirected request would fail, the whole AJAX call would, and the success callback would never get executed.

As you can see from the above accumulation, the root cause of the problem is that the whole login flow is messy and, in my opinion, reeds a deeper rewriting.

For a more immediate effect, I wrote a kludge that fixes the symptoms as follows:

  • Return a 204 in case of an external WebID rather than a redirect, which causes the AJAX request to succeed.

The redirect is still the wrong one; we depend on #648 to address that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RubenVerborgh
Implement kludge to make external WebIDs work.
b78aec3
@RubenVerborgh RubenVerborgh added bug ready for review blocker labels Apr 19, 2018
@RubenVerborgh
RubenVerborgh requested a review from timbl April 19, 2018 19:16
@RubenVerborgh RubenVerborgh mentioned this pull request Apr 19, 2018
WebID-OIDC implementation excludes use of WebID authenticated using WebID-TLS #649
Closed
@melvincarvalho

melvincarvalho commented Apr 19, 2018

Copy link
Copy Markdown
Contributor

Just cc'ing @dmitrizagidulin on this as he design a lot of this work flow ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dmitrizagidulin

dmitrizagidulin commented Apr 19, 2018

Copy link
Copy Markdown
Contributor

@melvincarvalho - thanks Melvin! Was just looking at it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RubenVerborgh
RubenVerborgh requested a review from dmitrizagidulin April 22, 2018 10:49
timbl
timbl approved these changes Apr 22, 2018
View reviewed changes
@RubenVerborgh
RubenVerborgh merged commit 456bdc9 into develop Apr 22, 2018
@RubenVerborgh
RubenVerborgh deleted the fix/tls-with-oidc branch April 22, 2018 13:46
@dmitrizagidulin

dmitrizagidulin commented Apr 22, 2018

Copy link
Copy Markdown
Contributor

@RubenVerborgh apologies for late reply -- looks great to me!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RubenVerborgh RubenVerborgh mentioned this pull request May 3, 2018
Proper redirect after logging in with TLS #663
Closed
@melvincarvalho melvincarvalho added the authentication label May 10, 2018
@melvincarvalho melvincarvalho mentioned this pull request Jan 8, 2026
Enable WebID-TLS integration tests (fix self-signed cert verification loop) #1841
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dmitrizagidulin dmitrizagidulin Awaiting requested review from dmitrizagidulin
1 more reviewer
@timbl timbl timbl approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

authentication blocker bug ready for review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@RubenVerborgh @melvincarvalho @dmitrizagidulin @timbl
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.