Skip to content
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

feat(publisher): Authenticate Publisher with Drupal #1339

Merged
merged 32 commits into from
Jun 27, 2023

Conversation

colorfield
Copy link
Member

@colorfield colorfield commented Apr 19, 2023

Package(s) involved

  • Publisher
  • Drupal app

Description of changes

OAuth2 middleware that is checking if a Drupal user has the Access Publisher permission to grant access to Express authenticated routes.

Grant types

  • AuthorizationCode
  • ResourceOwnerPassword

Keeps BC with existing Basic Auth: provides a configurable way, so nothing will change on existing setups unless OAuth2 is configured.

Opens the possibility to generalise OAuth2 for other use cases: Instant preview, Gatsby sourcing, end user or other APIs authentication.

Documentation for Publisher and Drupal configuration.

TBD

Drupal Publisher scope/role might be a bit too generic and potentially conflict with editorial related roles. Perhaps choose the Publisher Builder name.

Remaining tasks

Motivation and context

https://amazeelabs.atlassian.net/browse/SLB-176

Related Issue(s)

#1137

How has this been tested?

Manually.

@colorfield colorfield changed the title feat(publisher): feat(publisher): Authenticate Publisher with Drupal Apr 19, 2023
@github-actions
Copy link

github-actions bot commented Apr 19, 2023

composer.lock changes

Click to toggle table visibility
Prod Packages Operation Base Target
defuse/php-encryption New - v2.3.1
drupal/consumers New - 1.17.0
drupal/simple_oauth New - 5.2.3
lcobucci/clock New - 3.0.0
lcobucci/jwt New - 4.3.0
league/event New - 2.2.0
league/oauth2-server New - 8.5.1
league/uri New - 6.8.0
league/uri-interfaces New - 2.3.0
paragonie/random_compat New - v9.99.100
psr/clock New - 1.0.0
steverhoades/oauth2-openid-connect-server New - v2.5.0

@colorfield colorfield marked this pull request as ready for review June 20, 2023 13:24
@colorfield colorfield requested review from Leksat and pmelab June 20, 2023 13:25
Copy link
Contributor

@pmelab pmelab left a comment

Choose a reason for hiding this comment

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

Great! Now to apply this in the template!

@colorfield colorfield merged commit 1564f91 into development Jun 27, 2023
@colorfield colorfield deleted the publisher-auth branch June 27, 2023 09:05
@colorfield
Copy link
Member Author

Going to create a PR in the silverback-template repository and reference it here after.

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.

2 participants