Skip to content

Restricting access to some HTTP API endpoints to top domain - #1073

Merged
kjetilk merged 76 commits into
release/v5.0.0from
feature/prevent-api-spoofing
Mar 15, 2019
Merged

kjetilk merged 76 commits into
release/v5.0.0from
feature/prevent-api-spoofing

Conversation

@megoth

@megoth megoth commented Jan 28, 2019

Copy link
Copy Markdown
Contributor

This is to prevent attempts at spoofing such as https://[subdomain]/register.

@megoth megoth changed the title Restricting access to API endpoints to top domain Restricting access to some API endpoints to top domain Jan 28, 2019
@megoth megoth changed the title Restricting access to some API endpoints to top domain Restricting access to some HTTP API endpoints to top domain Jan 28, 2019
@megoth

megoth commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

This is an attempt to fix #1031

@megoth

megoth commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

I need to do a bit more to make sure that capability discovery does not break (making sure the URLs point to the top domain endpoints). Don't merge this before that is in place.

@megoth megoth closed this Jan 28, 2019
@megoth

megoth commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

I'm closing this until I have the other part in place - will work on it tomorrow, and reopen the PR when it's done.

@megoth
megoth requested a review from joachimvh January 29, 2019 12:41
@megoth megoth self-assigned this Feb 4, 2019
@megoth megoth reopened this Feb 15, 2019
Login and logout should be accessible on subdomains

Restricting access to API endpoints to top domain
@megoth
megoth force-pushed the feature/prevent-api-spoofing branch from abc0d6c to f02987d Compare February 15, 2019 13:35
Should be able to login and logout and keep tokens updated via endpoints on subdomain
@megoth

megoth commented Feb 15, 2019

Copy link
Copy Markdown
Contributor Author

Ok, have laxed a bit on some resources that I think should be accessible via subdomain. These are /login, /logout, and /api/oidc/rp/:issuer_id (and various alternatives). I'm uncertain about the latter one, so please confirm if my assumption is correct.

@megoth

megoth commented Feb 15, 2019 •

Copy link
Copy Markdown
Contributor Author

Capability discovery should be working as expected now, if I have understood it correctly.

Maybe @RubenVerborgh, @dmitrizagidulin and/or @kjetilk can give this a new look?

@kjetilk kjetilk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sane to me, but I would like more reviews, as I'm not too confident about it myself.

@kjetilk
kjetilk requested a review from michielbdejong March 8, 2019 21:31
@michielbdejong michielbdejong mentioned this pull request Mar 15, 2019
24 of 26 tasks
megoth and others added 4 commits March 15, 2019 16:06
Login and logout should be accessible on subdomains

Restricting access to API endpoints to top domain
Should be able to login and logout and keep tokens updated via endpoints on subdomain
…solid-server into feature/prevent-api-spoofing

@michielbdejong michielbdejong left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this to unblock the 5.0.0 release, since technically this is a breaking change, but since this PR does not add any tests to cover the new functionality, we have to be careful: As discussed on gitter, we'll be relying on @kjetilk's manual testing to make sure this does not, for instance, accidentally break these endpoints on the top domain somehow.

@kjetilk kjetilk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it manually, and it looks good.

@kjetilk
kjetilk merged commit c0bbc99 into release/v5.0.0 Mar 15, 2019
@kjetilk
kjetilk deleted the feature/prevent-api-spoofing branch March 15, 2019 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants