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] Deprecated ROLE_PREVIOUS_ADMIN#35858

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

Conversation

wouterj
Copy link
Member

@wouterjwouterj commentedFeb 25, 2020
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
Deprecations?yes
Ticketsn/a
LicenseMIT
Doc PRsymfony/symfony-docs#11487

ROLE_PREVIOUS_ADMIN is added to the token roles if the session is an impersonation. Since#31189 we have theIS_IMPERSONATOR attribute which can be used for the same reason. I propose to deprecate theROLE_PREVIOUS_ADMIN:

  • This is not what roles are for (resulting in hacking this exception inAbstractToken)
  • The role isn't very descriptive
  • I don't like having 2 ways of doing exactly the same thing
  • While every application with impersonation enabled probably needs to be updated, the update is as simple as replacingROLE_PREVIOUS_ADMIN withIS_IMPERSONATOR:find ./ -type f -exec sed -i 's/ROLE_PREVIOUS_ADMIN/IS_IMPERSONATOR/g' {} +

I'm a bit unsure on how to deprecate this role, but I think having it inRoleVoter is probably the safest (isGranted() and variants +AccessDecisionManager#decide() all use this voter to check if the token has this role).

dmaicher, andreybolonin, TomasVotruba, and pierreboissinot reacted with thumbs up emoji
@wouterjwouterjforce-pushed thesecurity/deprecated-role-previous-admin branch fromd0bf1c1 todce55f3CompareFebruary 25, 2020 12:38
@fabpot
Copy link
Member

Thank you@wouterj.

@fabpotfabpot merged commit82db995 intosymfony:masterFeb 25, 2020
@wouterjwouterj deleted the security/deprecated-role-previous-admin branchFebruary 25, 2020 13:03
fabpot added a commit that referenced this pull requestFeb 29, 2020
…wouterj)This PR was merged into the 5.1-dev branch.Discussion----------Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | n/a| License       | MIT| Doc PR        | n/aI forgot to update the UPGRADE guides in#35858Commits-------3c8d316 Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide
@fabpotfabpot mentioned this pull requestMay 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@wouterj@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp