New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add member auth to the Delivery API #14730
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…authentication and handling within the Delivery API
…bling Delivery API member auth in Swagger
…s the requested resource
# Conflicts: # src/Umbraco.Cms.Api.Delivery/Controllers/ContentApiControllerBase.cs # src/Umbraco.Cms.Api.Delivery/DependencyInjection/UmbracoBuilderExtensions.cs # src/Umbraco.Cms.Api.Management/Controllers/Security/BackOfficeController.cs # src/Umbraco.Core/Configuration/Models/DeliveryApiSettings.cs
elit0451
reviewed
Sep 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💪 🙌 , I've left a few comments for you to consider 🙂
src/Umbraco.Cms.Api.Delivery/Controllers/ContentApiControllerBase.cs
Outdated
Show resolved
Hide resolved
src/Umbraco.Cms.Api.Delivery/Controllers/ContentApiItemControllerBase.cs
Outdated
Show resolved
Hide resolved
src/Umbraco.Cms.Api.Delivery/Controllers/ContentApiItemControllerBase.cs
Outdated
Show resolved
Hide resolved
elit0451
approved these changes
Sep 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome! 🚀🔥
…endpoints (as of now they do not exist, a separate task will fix that)
…in screen for new back-office (will be swapped back again to ensure correct .well-known endpoints, see FIXME comment)
…ry-api-member-auth
elit0451
approved these changes
Sep 26, 2023
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prerequisites
Description
This PR adds member auth to the Delivery API. The PR is targeted v14 on purpose, because we need to ensure that the solution can co-exist with users auth in the Management API. A separate task exists to copy all relevant parts of this PR to v12 once this PR is merged.
This "backwards" kind of developing means I've tried to target a v12 PR in a v14 PR. It gets a little weird in some places. For example:
Paths
and the changedOAuthClientIds
), so they're OK to merge in.At this time, member auth is not expected to be widely adopted by consumers of the Delivery API. Therefore this PR has been constructed to have zero negative impact at query time, if member auth is not used in the Delivery API. This results in a few somewhat wonky code execution paths, but as the alternative would be to inflict a performance penalty on every last consumer of the Delivery API, the wonky paths are a fair trade-off.
Testing this PR
This PR should be tested alongside the docs article that is being finalized now. The article contains a lot of code samples that are required to test the PR.
It's not going to make a lot of sense to outline every last test scenario here, as there are a LOT and most all of them require additional test projects on the side to perform auth against the Delivery API. Thus, testing will be performed as peer testing with @kjac
A little checklist of things to absolutely remember (mostly for my own sake):