-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply Disable ExtAuth from GlobalExtAuth and Remove Auth from HTTP Up…
…grade (#6661) * fix #6617 and #6659 Changes: - use dagRoute's AuthContext and AuthDisabled in HTTPS-Upgrade to fix 6659 - Use globalExtAuth.AuthPolicy.Disabled to calculate dagRoute.AuthDisabled - Fix Tests Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * add changelog Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix indentation Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix indentation in route.go Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * disable ext_auth when upgrading to HTTPS Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix tests for "disable ext_auth when upgrading to HTTPS" Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix CHANGELOG for "disable ext_auth when upgrading to HTTPS" Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * add tests for globalExtAuth.AuthPolicy.disabled proper behaviour Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix gofumpt issue with global_authorization_test.go Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix nil authorization extref issue while overwriting GlobalExtAuth Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * fix linting issue Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> * Update changelogs/unreleased/6661-SamMHD-minor.md Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz> --------- Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz>
- Loading branch information
Showing
11 changed files
with
408 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Disable ExtAuth by default if GlobalExtAuth.AuthPolicy.Disabled is set | ||
|
||
Global external authorization can now be disabled by default and enabled by overriding the vhost and route level auth policies. | ||
This is achieved by setting the `globalExtAuth.authPolicy.disabled` in the configuration file or `ContourConfiguration` CRD to `true`, and setting the `authPolicy.disabled` to `false` in the vhost and route level auth policies. | ||
The final authorization state is determined by the most specific policy applied at the route level. | ||
|
||
## Disable External Authorization in HTTPS Upgrade | ||
|
||
When external authorization is enabled, no authorization check will be performed for HTTP to HTTPS redirection. | ||
Previously, external authorization was checked before redirection, which could result in a 401 Unauthorized error instead of a 301 Moved Permanently status code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.