Headless IdP validates external-identity-provider-issued JWTs for decoupled/headless Drupal. The front end authenticates the user directly against an IdP (AWS Cognito, Okta), then calls Drupal with the IdP's Bearer token. The module verifies that token against the provider's JWKS, links the account through externalauth, and exposes REST endpoints for login, MFA challenge/response, enrolment, session revocation and token refresh.
How it differs from existing modules
- Not an OpenID Connect relying-party (openid_connect): there is no redirect/authorization-code flow and no session cookies. The front end already holds the token; Drupal only validates it.
- Not an OAuth server (simple_oauth): it does not mint tokens. It runs as a standalone authentication provider alongside simple_oauth and validates tokens minted by an external IdP.
- Not a generic JWT library (jwt): it is a provider-plugin framework with MFA, enrolment, lifecycle sync and account linking, shipped with concrete Cognito and Okta implementations behind nine opt-in capability interfaces.
Code quality
- phpcs clean against Drupal and DrupalPractice.
- GitLab CI pipeline green: phpcs, phpstan, phpunit, cspell, eslint.
- Unit and kernel coverage, including a dedicated security-kernel suite that reproduces algorithm-confusion, claim-tampering, link-hijack, refresh-token-hijack and user-enumeration attacks against published RFC and CWE references.
- No third-party libraries vendored in the repository; dependencies are composer-managed.
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
vishal.kadamFILE: headless_idp.module
A new module that aims to be compatible with latest Drupal releases is expected to implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
Comment #5
matt-whelan commentedThanks for the review.
The hook implementations are now object-oriented
#[Hook]class methods:src/Hook/UserHooks:user_presave,form_user_form_alter,form_user_register_form_alter.src/Hook/CognitoUserHooks:user_presave,user_insert,user_update.Dependencies are constructor-injected (autowired services).
The project supports
^10.2 || ^11, so the procedural functions remain in the.modulefiles as thin#[LegacyHook]shims that delegate to the services, per the backwards-compatibility approach in the change record. On Drupal 11.1+ the shims are skipped and the OOP methods run directly.Two hooks stay procedural by design, matching the "Hooks that remain procedural" list in the change record:
hook_requirements(with#[LegacyRequirementsHook]) andhook_module_implements_alter(with#[LegacyModuleImplementsAlter]). The Cognito-before-baseuser_presaveordering is declared with the#[Hook]order:parameter on Drupal 11.2+ andmodule_implements_alteron older core.Verified on Drupal 10.2, 11.1 and 11.3.
Setting back to Needs review.
Comment #6
matt-whelan commentedComment #7
vishal.kadamRest seems fine to me.
Please wait for other reviewers and Project Moderator to take a look and if everything goes fine, you will get the role.