Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] Rework firewall's access denied rule#30423

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.4fromdimabory:security-access-denied-rework
Apr 10, 2019

Conversation

@dimabory
Copy link
Contributor

@dimaborydimabory commentedMar 1, 2019
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#30099,#28229
LicenseMIT
Doc PR

Follow tickets provided above to reproduce bugs. (there are also some project examples)

In addition, I'm looking for someone who knows an answer tothis regarding rework in this PR.

@dimaborydimabory marked this pull request as ready for reviewMarch 1, 2019 17:24
@dimaborydimaboryforce-pushed thesecurity-access-denied-rework branch from9b2acc0 to9073c94CompareMarch 1, 2019 17:28
@chalasrchalasr added this to the3.4 milestoneMar 2, 2019
@chalasrchalasr self-requested a reviewMarch 2, 2019 16:35
@dimaborydimaboryforce-pushed thesecurity-access-denied-rework branch 2 times, most recently fromf1849b3 to461b2a4CompareMarch 7, 2019 08:47
@curry684
Copy link
Contributor

Please use a single PR per issue next time, easier to review.

Fixes themself are fine.

Status: reviewed

@curry684
Copy link
Contributor

Actually it shouldn't be based onmaster as it's a bugfix. I'll see if I can rebase it on 3.4.

@michaelcullummichaelcullum changed the base branch frommaster to3.4April 6, 2019 14:34
@michaelcullummichaelcullum changed the base branch from3.4 tomasterApril 6, 2019 14:34
@curry684
Copy link
Contributor

@chalasr I just discussed with@michaelcullum that I think we should consider merging it intomaster anyway despite being a bugfix, as older applications may actually be accidentally relying on the broken behavior.

So I'd prefer putting it intomaster instead and documenting it as a B/C breaking bugfix in the upgrade guide.

@nicolas-grekas
Copy link
Member

Let's add some notes in the CHANGELOG.md file of the component, and give some instructions in UPGRADE-4.3.md then

@curry684
Copy link
Contributor

@dimabory can you pick that up?

@dimabory
Copy link
ContributorAuthor

@curry684,@nicolas-grekas I'm not sure about B/C breaking. Can you guide me on what exactly can be broken with this change?

@curry684
Copy link
Contributor

The change may cause the AccessDeniedHandler to be executed now in cases where it wasn't before, and applications may depend on the previous erroneous behavior to some degree.

Technically everything that changes existing behavior is to be considered BC breakage, but in this case the old behavior was technically wrong and out of spec, hence why we're accepting the fix in a minor release, but not backporting it. But the PR should mention it in the upgrade guide.

@chalasr
Copy link
Member

Looking at the patch and the fixed ticket, I think we should merge in 3.4, every bugfix breaks someone's behavior.
Calling the access denied handler doesn't sound harmful, is it?

@curry684
Copy link
Contributor

I'm mainly hesitant because it'll be a patch level change in low level security behavior. I'm hard pressed to find a harmful scenario but I prefer to err on the side of caution where access control is involved... 😉

@dimabory
Copy link
ContributorAuthor

So what's the base branch3.4 ormaster?

@curry684
Copy link
Contributor

3.4.

Technically it's correct for a bugfix, I won't object to it and@chalasr is the boss of security component 😉

@dimaborydimabory changed the base branch frommaster to3.4April 9, 2019 14:28
@dimaborydimaboryforce-pushed thesecurity-access-denied-rework branch from461b2a4 to5790859CompareApril 9, 2019 15:06
@fabpot
Copy link
Member

Thank you@dimabory.

@fabpotfabpot merged commit5790859 intosymfony:3.4Apr 10, 2019
fabpot added a commit that referenced this pull requestApr 10, 2019
This PR was merged into the 3.4 branch.Discussion----------[Security] Rework firewall's access denied rule| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ~~#30099~~,#28229| License       | MIT| Doc PR        |Follow tickets provided above to reproduce bugs. (there are also some project examples)~~In addition, I'm looking for someone who knows an answer to [this](#30099 (comment)) regarding rework in this PR.~~Commits-------5790859 Rework firewall access denied rule
@dimabory
Copy link
ContributorAuthor

Excuse me, guys, but I didn't updateCHANGELOG.md andUPGRADE.md (like mentioned@curry684).

@fabpot
Copy link
Member

@dimabory As this is a bug fix, there is no need to update the CHANGELOG/UPGRADE files.

This was referencedApr 16, 2019
@JarJak
Copy link

@fabpot There probably is a need, see#31136

$event->setException($e);
}

return;
Copy link
Member

Choose a reason for hiding this comment

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

this now calls the accessDeniedHandler even when we call the entry point, which looks weird.

JarJak and mathielen reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

Good point, but it's pretty much technically in line given the rest of the implementation (it also logs at 123, same thing). Not really trivial to fix given how the flow works...

Choose a reason for hiding this comment

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

So if entry point returns 403 response you get endless redirect loop

chalasr pushed a commit to chalasr/symfony that referenced this pull requestApr 17, 2019
…rule (dimabory)"This reverts commitfd1408b, reversingchanges made tob93d2bf.
@andrew-demb
Copy link
Contributor

andrew-demb commentedApr 17, 2019
edited
Loading

These changes make log with message "Access denied, the user is neither anonymous, nor remember-me."(https://github.com/chalasr/symfony/blob/fd1408b13869a381fbebf9b9967f7a80e8b141d3/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php#L137) lying, because token may be anonymous on!$this->authenticationTrustResolver->isFullFledged($token) (https://github.com/chalasr/symfony/blob/fd1408b13869a381fbebf9b9967f7a80e8b141d3/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php#L121).

@andrew-demb
Copy link
Contributor

andrew-demb commentedApr 17, 2019
edited
Loading

Also with this PR symfony call access denied handler without any context, that response already generated for anonymous token.

In my case my handler doesn't expect calling for anonymous token and I got an infinite redirect.

I think it's BC break.

mathielen reacted with thumbs up emoji

@JarJak
Copy link

@andrew-demb fix is coming, see#31142

fabpot pushed a commit that referenced this pull requestApr 17, 2019
…ied rule (dimabory)" (chalasr)This PR was merged into the 3.4 branch.Discussion----------Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? |no| Tests pass?   | yes| Fixed tickets |#31136| License       | MIT| Doc PR        | n/aCommits-------cd77f6f Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"
fabpot pushed a commit that referenced this pull requestApr 17, 2019
* 3.4:  Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"  [FrameworkBundle] minor: remove a typo from changelog  [VarDumper][Ldap] relax some locally failing tests  [Validator]#30192 Added the missing translations for the Tagalog ("tl") locale.  Make MimeTypeExtensionGuesser case insensitive
fabpot pushed a commit that referenced this pull requestApr 17, 2019
* 4.2:  Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"  [FrameworkBundle] minor: remove a typo from changelog  [VarDumper] fix tests with ICU 64.1  [VarDumper][Ldap] relax some locally failing tests  [Validator]#30192 Added the missing translations for the Tagalog ("tl") locale.  Make MimeTypeExtensionGuesser case insensitive  Fix get session when the request stack is empty  [Routing] fix trailing slash redirection with non-greedy trailing vars  [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This was referencedApr 17, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

+2 more reviewers

@curry684curry684curry684 left review comments

@JarJakJarJakJarJak left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

10 participants

@dimabory@curry684@nicolas-grekas@chalasr@fabpot@JarJak@andrew-demb@stof@michaelcullum@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp