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

Prevent basic authentication from popping up #4556

Merged

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/kind api-change
/area core
/milestone 2.10.x

What this PR does / why we need it:

See #4547 for more.

This PR creates header WWW-Authenticate like FormLogin realm="console" instead of Basic realm="realm" while unauthorized.

Which issue(s) this PR fixes:

Fixes #4547

Special notes for your reviewer:

curl --head 'http://localhost:8090/actuator/info'
HTTP/1.1 401 Unauthorized
transfer-encoding: chunked
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
WWW-Authenticate: FormLogin realm="console"
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 0
Referrer-Policy: no-referrer

Does this PR introduce a user-facing change?

防止浏览器弹出基础认证弹窗

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 6, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.10.x milestone Sep 6, 2023
@f2c-ci-robot f2c-ci-robot bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API area/core Issues or PRs related to the Halo Core labels Sep 6, 2023
@JohnNiang JohnNiang changed the title Write ForLogin auth for WWW-Authenticate header Prevent basic authentication from popping up Sep 6, 2023
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 7, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 0098654 into halo-dev:main Sep 7, 2023
4 checks passed
@JohnNiang JohnNiang deleted the refactor/not-basic-www-authenticate branch September 8, 2023 02:43
@ruibaby ruibaby modified the milestones: 2.10.x, 2.10.0 Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent basic authentication from popping up
3 participants