Alfresco / alfresco-ng2-components

Alfresco Angular Components
https://www.alfresco.com/abn/adf/docs/
Apache License 2.0
294 stars 268 forks source link

[MNT-24682] Kerberos: do not add authorization header #10320

Closed tiagosalvado10 closed 1 month ago

tiagosalvado10 commented 1 month ago

Please check if the PR fulfills these requirements

  • [x] The commit message follows our guidelines
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation
  • [ ] Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)

When Kerberos is enabled, the Authorization header is being sent with basic authentication making some requests to fail with 401 error.

Further information can be found in MNT-24642 namely the comparison between sending and not sending the header with Kerberos.

What is the new behaviour?

Prevent the header from being added to the request if Kerberos is enabled.

Does this PR introduce a breaking change? (check one with "x")

  • [ ] Yes
  • [x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Two notes regarding the unit test I have added to authentication.service.spec.ts:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud