Make shield work with D8 core basic_auth (2)

Created on 15 November 2017, about 7 years ago
Updated 4 October 2024, about 1 month ago

allow access after the shield authentication, in the case is the core module basic_auth enabled

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France dfarouk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • First commit to issue fork.
  • Merge request !22Rerolled patch #10. β†’ (Open) created by DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I rerolled the patch as the MR.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 174s
    #301130
  • Pipeline finished with Failed
    about 1 month ago
    Total: 319s
    #301138
  • Pipeline finished with Failed
    about 1 month ago
    Total: 163s
    #301145
  • Pipeline finished with Failed
    about 1 month ago
    Total: 267s
    #301156
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    With the latest fixes the last issue is this test failure:

      public function testShieldWithBasicAuth() {
        // Configure shield, so it is enabled and basic_auth headers are kept.
        // We don't need to test the case with unset_basic_auth_headers to TRUE
        // as it is the default value, it is tested by testShieldCred().
        $this->config('shield.settings')
          ->set('shield_enable', TRUE)
          ->set('unset_basic_auth_headers', FALSE)
          ->save();
    
        $this->drupalGet('user', [], ['Authorization' => 'Basic ' . base64_encode('user:password')]);
        $this->assertSession()->statusCodeEquals(403);
      }
    

    The problem here is that it suggests the changes aren't working at all?

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I just realized that there's no way of controlling the "unset_basic_auth_headers" setting, so it might be worth adding a separate issue for that.

Production build 0.71.5 2024